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) {