diff --git a/install/action.yml b/install/action.yml index e2f225d..79dc565 100644 --- a/install/action.yml +++ b/install/action.yml @@ -18,3 +18,7 @@ inputs: description: asdf branch to clone required: false default: master + working_directory: + description: + The directory to run asdf install in, defaults to the workspace root. + required: false diff --git a/install/main.js b/install/main.js index 11004f0..3eb1fe2 100644 --- a/install/main.js +++ b/install/main.js @@ -1301,6 +1301,10 @@ async function pluginsAdd() { // lib/install/index.ts async function toolsInstall() { + const workingDirectory = core3.getInput("working_directory", { + required: false + }); + workingDirectory && process.chdir(workingDirectory); await pluginsAdd(); const before = core3.getInput("before_install", {required: false}); if (before) { diff --git a/lib/install/index.ts b/lib/install/index.ts index 859ec1b..de020a9 100644 --- a/lib/install/index.ts +++ b/lib/install/index.ts @@ -3,6 +3,10 @@ import * as exec from "@actions/exec"; import { pluginsAdd } from "../plugins-add"; export async function toolsInstall(): Promise { + const workingDirectory = core.getInput("working_directory", { + required: false, + }); + workingDirectory && process.chdir(workingDirectory); await pluginsAdd(); const before = core.getInput("before_install", { required: false });