summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Thelemann2019-09-03 00:24:53 +0200
committerJonas Thelemann2019-09-03 00:28:44 +0200
commit3d9c97fc651b680ae839f1a9b6fe3db78ae708e0 (patch)
tree9362ec2093d55c14a5b5cd6dfd70a504d2ba5c2b
parent6755d1b9897984d45001fd4aa1209854a5d69da6 (diff)
Config: Return String Instead Of Buffer For Docker Secrets
Prevents "TypeError: Cannot freeze array buffer views with elements". Signed-off-by: Jonas Thelemann <e-mail@jonas-thelemann.de>
Diffstat (limited to '')
-rw-r--r--lib/config/dockerSecret.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/config/dockerSecret.js b/lib/config/dockerSecret.js
index 50bf7fe2..901ff2f5 100644
--- a/lib/config/dockerSecret.js
+++ b/lib/config/dockerSecret.js
@@ -7,7 +7,7 @@ const basePath = path.resolve('/var/run/secrets/')
function getSecret (secret) {
const filePath = path.join(basePath, secret)
- if (fs.existsSync(filePath)) return fs.readFileSync(filePath)
+ if (fs.existsSync(filePath)) return fs.readFileSync(filePath).toString('utf8')
return undefined
}