Skip to content

Commit

Permalink
Fix warning message format
Browse files Browse the repository at this point in the history
  • Loading branch information
abhilash1in committed May 16, 2020
1 parent e00c74c commit af95720
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,11 @@ const injectSecretValueMapToEnvironment = (secretValueMap: object, core): void =
// Get POSIX compliant name secondary env name that can be read by the shell
const secretNamePOSIX = getPOSIXString(secretName)
if (secretName !== secretNamePOSIX) {
core.warning(`POSIX compliance: Environment variable names can only contain upper case letters, \
digits and underscores. It cannot begin with a digit.
Secret name '${secretName}' is not POSIX compliant. It will be changed to '${secretNamePOSIX}'.`)
const part1 = `Secret name '${secretName}' is not POSIX compliant. `
const part2 = `It will be changed to '${secretNamePOSIX}'.\n\n`
const part3 = 'POSIX compliance: environment variable names can only contain upper case letters, '
const part4 = 'digits and underscores. It cannot begin with a digit.'
core.warning(part1.concat(part2).concat(part3).concat(part4))
}
core.debug(`Injecting secret: ${secretNamePOSIX} = ${secretValue}`)
core.exportVariable(secretNamePOSIX, secretValue)
Expand Down

0 comments on commit af95720

Please sign in to comment.