Skip to content

Commit

Permalink
split choosenim arg (#308)
Browse files Browse the repository at this point in the history
  • Loading branch information
tuffnatty authored Feb 1, 2023
1 parent e9bedea commit 3258b6b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/installer.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function installNim(version, noColor, yes) {
throw err;
}
core.info(stdout);
proc.execFile('choosenim.exe', [version], (err, stdout, stderr) => {
proc.execFile('choosenim.exe', version.split(/\s+/), (err, stdout, stderr) => {
if (err) {
core.error(err);
throw err;
Expand All @@ -99,7 +99,7 @@ function installNim(version, noColor, yes) {
}
core.info(stdout);
// Build optional parameters of choosenim.
let args = [version];
let args = version.split(/\s+/);
if (noColor)
args.push('--noColor');
if (yes)
Expand Down
4 changes: 2 additions & 2 deletions src/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ async function installNim(version: string, noColor: boolean, yes: boolean) {
core.info(stdout)
proc.execFile(
'choosenim.exe',
[version],
version.split(/\s+/),
(err: any, stdout: string, stderr: string) => {
if (err) {
core.error(err)
Expand All @@ -83,7 +83,7 @@ async function installNim(version: string, noColor: boolean, yes: boolean) {
core.info(stdout)

// Build optional parameters of choosenim.
let args: string[] = [version]
let args: string[] = version.split(/\s+/)
if (noColor) args.push('--noColor')
if (yes) args.push('--yes')

Expand Down

0 comments on commit 3258b6b

Please sign in to comment.