Skip to content

Commit

Permalink
fix: run-install array output
Browse files Browse the repository at this point in the history
  • Loading branch information
erikburt committed Jan 23, 2024
1 parent 7df928f commit 8e68382
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/inputs/run-install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ export function parseRunInstall(name: string): RunInstall[] {

validateRunInstallInput(input)

if (Array.isArray(input)) return input

return input;
return Array.isArray(input) ? input : [input]
}

function validateRunInstallInput(input: any) {
Expand All @@ -38,7 +36,6 @@ function validateRunInstallInput(input: any) {
} else {
validateRunInstallEntry(input)
}

}

function validateRunInstallEntry(input: any) {
Expand All @@ -57,4 +54,4 @@ function validateRunInstallEntry(input: any) {
if (input.args !== undefined && !Array.isArray(input.args)) {
throw new Error('Invalid input for run_install.args')
}
}
}

0 comments on commit 8e68382

Please sign in to comment.