From 8f00ad1f711748501febd3e153b4211ad6ceb8dc Mon Sep 17 00:00:00 2001 From: Annika Merris Date: Sat, 3 Feb 2024 18:52:00 -0500 Subject: [PATCH] Trying To Add The Ability To Specify The Shell Command Used --- src/extract.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/extract.js b/src/extract.js index 9c0e32d..aa9e6c8 100644 --- a/src/extract.js +++ b/src/extract.js @@ -3,6 +3,7 @@ const exec = require('@actions/exec'); async function run() { try { + const shell = core.getInput('shell_command') || "/bin/bash -c"; const image = core.getInput('image'); const path = core.getInput('path'); const destination = core.getInput('destination') || `.extracted-${Date.now()}`; @@ -10,7 +11,7 @@ async function run() { const create = `docker cp $(docker create ${image}):/${path} ${destination}`; await exec.exec(`mkdir -p ${destination}`); - await exec.exec(`/bin/bash -c "${create}"`, []); + await exec.exec(`${shell} "${create}"`, []); core.setOutput('destination', destination); } catch (error) {