From 89ee60634ce35ccd3e14cfcd5510c61e0773cc95 Mon Sep 17 00:00:00 2001 From: Dawid Dziurla Date: Thu, 14 May 2020 20:16:43 +0200 Subject: [PATCH] post: change directory if saved --- post.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/post.js b/post.js index 400221d..b5441ba 100644 --- a/post.js +++ b/post.js @@ -8,10 +8,14 @@ function rm(file) { async function main() { try { + const directory = core.getState("directory") const keyFile = core.getState("keyFile") const inventoryFile = core.getState("inventoryFile") const vaultPasswordFile = core.getState("vaultPasswordFile") + if (directory) + process.chdir(directory) + if (keyFile) rm(keyFile)