From 086ce5986b16713437086bb4a449a76111b29413 Mon Sep 17 00:00:00 2001 From: afirth Date: Tue, 23 Jul 2024 14:00:19 +0200 Subject: [PATCH] failing linters --- install/action.yml | 4 ++-- install/main.js | 5 +++++ src/install/index.ts | 6 ++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/install/action.yml b/install/action.yml index cde0b21..b2f9c6f 100644 --- a/install/action.yml +++ b/install/action.yml @@ -6,11 +6,11 @@ runs: main: main.js inputs: tool_versions: - description: + description: |- If present, this value will be written to the .tool-versions file. required: false before_install: - description: + description: |- Bash script to run after plugins are installed but before `asdf install`. eg, to install npm keyring required: false diff --git a/install/main.js b/install/main.js index 5e1063d..3abd147 100644 --- a/install/main.js +++ b/install/main.js @@ -3363,6 +3363,11 @@ async function pluginsAdd() { // src/install/index.ts async function toolsInstall() { + const dir = core3.getInput("directory", { required: false }); + if (dir) { + const process2 = require("node:process"); + process2.chdir(dir); + } await pluginsAdd(); const before = core3.getInput("before_install", { required: false }); if (before) { diff --git a/src/install/index.ts b/src/install/index.ts index 25ffe83..978b9bf 100644 --- a/src/install/index.ts +++ b/src/install/index.ts @@ -3,6 +3,12 @@ import * as exec from '@actions/exec'; import {pluginsAdd} from '~/plugins-add/index.ts'; async function toolsInstall(): Promise { + const dir = core.getInput('directory', {required: false}); + if (dir) { + const process = require('node:process'); + process.chdir(dir); + } + await pluginsAdd(); const before = core.getInput('before_install', {required: false});