From 65a5f82a374d5ce324378a57b67a172d05ab7392 Mon Sep 17 00:00:00 2001 From: Oliver Jones Date: Tue, 28 Jan 2020 20:33:21 +1100 Subject: [PATCH] Create & write out the buffer correctly --- src/main.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.ts b/src/main.ts index 7aaa723..6ea0a4c 100644 --- a/src/main.ts +++ b/src/main.ts @@ -24,10 +24,10 @@ async function run(): Promise { } if (p12FileBase64 !== '') { - const buffer = new Buffer(p12FileBase64, 'base64') + const buffer = Buffer.from(p12FileBase64, 'base64') const tempFile = tmp.fileSync() p12Filepath = tempFile.name - fs.writeFileSync(p12Filepath, buffer.toString('utf-8')) + fs.writeFileSync(p12Filepath, buffer) } if (keychainPassword === '') {