From db08f89c2bb26ca686c241ad6cb3a2ee03326610 Mon Sep 17 00:00:00 2001 From: Kieran Date: Fri, 22 May 2020 16:03:22 +0100 Subject: [PATCH] Added cwd to verbose output --- index.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/index.ts b/index.ts index 2b5fadb..e1b312e 100644 --- a/index.ts +++ b/index.ts @@ -65,13 +65,14 @@ const runCommand = ( const context = { file, ...options.templateData } command = template(command)(context) + const cwd = template(options.cwd)(context); if (options.verbose) { - fancyLog(`${PLUGIN_NAME}:`, chalk.cyan(command)) + fancyLog(`${PLUGIN_NAME}:`, chalk.cyan(cwd + "$ " + command)) } const child = spawn(command, { env: options.env, - cwd: template(options.cwd)(context), + cwd: cwd, shell: options.shell, stdio: options.quiet ? 'ignore' : 'inherit' })