From dbba86b24f9a95c4f02087db98c8c4eda7c9d7fc Mon Sep 17 00:00:00 2001 From: Helio Machado <0x2b3bfa0+git@googlemail.com> Date: Tue, 6 Dec 2022 01:28:20 +0000 Subject: [PATCH] Fix remaining options --- src/cml.js | 2 +- src/terraform.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cml.js b/src/cml.js index 0dae5e067..b8059f117 100755 --- a/src/cml.js +++ b/src/cml.js @@ -520,7 +520,7 @@ class CML { return await exec('git', 'fetch', '--all', '--unshallow'); } } else { - return await exec('git', 'fetch', '--all', `--depth=${fetchDepth}`); + return await exec('git', 'fetch', '--all', '--depth', fetchDepth); } } } diff --git a/src/terraform.js b/src/terraform.js index 0ee207290..ef3216705 100644 --- a/src/terraform.js +++ b/src/terraform.js @@ -33,7 +33,7 @@ const saveTfState = async (opts = {}) => { const init = async (opts = {}) => { const { dir = './' } = opts; - return await exec('terraform', `-chdir=${dir}`, 'init'); + return await exec('terraform', '-chdir', dir, 'init'); }; const apply = async (opts = {}) => { @@ -58,13 +58,13 @@ const apply = async (opts = {}) => { const destroy = async (opts = {}) => { const { dir = './', target } = opts; - const targetop = target ? `-target=${target}` : ''; return await exec( 'terraform', - `-chdir=${dir}`, + '-chdir', + dir, 'destroy', '-auto-approve', - targetop + ...(target && ['-target', target]) ); };