Skip to content

Commit

Permalink
Remove --install-dir processing
Browse files Browse the repository at this point in the history
  • Loading branch information
mosteo committed Mar 13, 2024
1 parent 7e477b6 commit c25291a
Show file tree
Hide file tree
Showing 296 changed files with 36,473 additions and 2,916 deletions.
16 changes: 4 additions & 12 deletions lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,20 +128,17 @@ function run() {
var version;
var branch;
var tool_args;
var tool_dir;
if (process.argv[2]) { // e.g., node lib/script.js <json object>
const inputs = JSON.parse(process.argv[2]);
version = inputs.version;
branch = inputs.branch;
tool_args = inputs.toolchain;
tool_dir = inputs.toolchain_dir;
}
else {
// Old way in case this is fixed by GH
version = core.getInput('version');
branch = core.getInput('branch');
tool_args = core.getInput('toolchain');
tool_dir = core.getInput('toolchain_dir');
}
// Install the requested version/branch unless cached
const cached = detect_cached();
Expand All @@ -157,15 +154,10 @@ function run() {
core.addPath(path_1.default.join(process.cwd(), install_dir, 'bin'));
// And configure the toolchain
if (tool_args.length > 0 && !cached) {
if (tool_dir.length == 0) {
yield exec.exec(`alr -n toolchain ${tool_args != "--disable-assistant" ? "--select " : ""} ${tool_args}`);
// Disable the assistant anyway if we have selected something. This will no longer be necessary after 1.1.1
if (tool_args != "--disable-assistant") {
yield exec.exec(`alr -n toolchain --disable-assistant`);
}
}
else {
yield exec.exec(`alr -n toolchain --install ${tool_args} --install-dir ${tool_dir}`);
yield exec.exec(`alr -n toolchain ${tool_args != "--disable-assistant" ? "--select " : ""} ${tool_args}`);
// Disable the assistant anyway if we have selected something. This will no longer be necessary after 1.1.1
if (tool_args != "--disable-assistant") {
yield exec.exec(`alr -n toolchain --disable-assistant`);
}
}
// Show the alr now in the environment and the configured toolchain
Expand Down
58 changes: 39 additions & 19 deletions node_modules/.package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions node_modules/@actions/core/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions node_modules/@actions/core/lib/core.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion node_modules/@actions/core/lib/oidc-utils.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion node_modules/@actions/core/lib/oidc-utils.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions node_modules/@actions/core/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion node_modules/@actions/http-client/lib/auth.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions node_modules/@actions/http-client/lib/index.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c25291a

Please sign in to comment.