From 3d9c97fc651b680ae839f1a9b6fe3db78ae708e0 Mon Sep 17 00:00:00 2001 From: Jonas Thelemann Date: Tue, 3 Sep 2019 00:24:53 +0200 Subject: [PATCH] Config: Return String Instead Of Buffer For Docker Secrets Prevents "TypeError: Cannot freeze array buffer views with elements". Signed-off-by: Jonas Thelemann --- lib/config/dockerSecret.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/config/dockerSecret.js b/lib/config/dockerSecret.js index 50bf7fe2c..901ff2f5c 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 }