Skip to content

Commit 6790ed7

Browse files
UlisesGasconRafaelGSS
authored andcommitted
feat: extended affectedEnvironments validation to support new values
See: nodejs/security-wg@17e08b9
1 parent dc26938 commit 6790ed7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

action.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ async function run () {
55
// Inputs
66
const nodeVersion = core.getInput('node-version', { required: true })
77
const platform = core.getInput('platform', { required: false })
8+
const availablePlatforms = ['linux', 'win', 'osx', 'smartos', 'aix', 'freebsd']
89

9-
if (platform && !['linux', 'win', 'osx'].includes(platform)) {
10-
core.setFailed(`platform ${platform} is not valid. Please use linux, win or osx.`)
10+
if (platform && !availablePlatforms.includes(platform)) {
11+
core.setFailed(`platform ${platform} is not valid. Please use ${availablePlatforms.join(',')}.`)
1112
return
1213
}
1314

0 commit comments

Comments
 (0)