From 13891b3514a940e87c680a60b94703b1982b7c42 Mon Sep 17 00:00:00 2001 From: Rishav Dhar <19497993+RDhar@users.noreply.github.com> Date: Mon, 26 Aug 2024 12:40:17 +0100 Subject: [PATCH] fix decryption quotes (#283) Signed-off-by: Rishav Dhar <19497993+RDhar@users.noreply.github.com> --- .github/workflows/tf_sample.yaml | 2 +- action.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tf_sample.yaml b/.github/workflows/tf_sample.yaml index 3f66bb8b..acdf70f6 100644 --- a/.github/workflows/tf_sample.yaml +++ b/.github/workflows/tf_sample.yaml @@ -56,6 +56,6 @@ jobs: arg_backend_config: ${{ contains(matrix.dir, 'bucket') && format('backend/{0}.tfbackend', matrix.env) || '' }} arg_var_file: ${{ contains(matrix.dir, 'instance') && format('env/{0}.tfvars', matrix.env) || '' }} arg_workspace: ${{ matrix.env }} - encrypt_passphrase: ${{ secrets.TF_ENCRYPTION }} arg_or_create: true cache_plugins: true + encrypt_passphrase: ${{ secrets.TF_ENCRYPTION }} diff --git a/action.js b/action.js index b5b9be05..627bddf9 100644 --- a/action.js +++ b/action.js @@ -292,11 +292,11 @@ module.exports = async ({ context, core, exec, github }) => { // Download and unzip the TF plan artifact. await exec.exec("/bin/bash", [ "-c", - `curl --no-progress-meter --location ${download_artifact.url} --output ${tf_identifier}`, + `curl --no-progress-meter --location "${download_artifact.url}" --output "${tf_identifier}"`, ]); await exec.exec("/bin/bash", [ "-c", - `unzip ${tf_identifier} -d ${process.env.arg_chdir.replace(/^-chdir=/, "")}`, + `unzip "${tf_identifier}" -d "${process.env.arg_chdir.replace(/^-chdir=/, "")}"`, ]); // Decrypt the TF plan file if encrypted.