Closed
Description
getInput function in @actions/core
package only replaces the first occurrence of a "space" character.
e.g. 'require some value' will be transformed to 'INPUT_REQUIRE_SOME VALUE' which is wrong.
export function getInput(name: string, options?: InputOptions): string {
const val: string =
process.env[`INPUT_${name.replace(' ', '_').toUpperCase()}`] || ''
if (options && options.required && !val) {
throw new Error(`Input required and not supplied: ${name}`)
}
/* ... */
Following line
toolkit/packages/core/src/core.ts
Line 75 in 5fd70ca
process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || ''
Activity