From 0be784351d4352df1f87d623de0503a38e376c79 Mon Sep 17 00:00:00 2001 From: Jonas Thelemann Date: Tue, 3 Sep 2019 17:58:31 +0200 Subject: Docker Secrets: Use Encoding Parameter Directly Signed-off-by: Jonas Thelemann --- lib/config/dockerSecret.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/config/dockerSecret.js') diff --git a/lib/config/dockerSecret.js b/lib/config/dockerSecret.js index 901ff2f5..bd397f58 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).toString('utf8') + if (fs.existsSync(filePath)) return fs.readFileSync(filePath, 'utf-8') return undefined } -- cgit v1.2.3