mirror of
https://github.com/github/codeql-action.git
synced 2025-12-26 17:20:10 +08:00
14 lines
375 B
JavaScript
14 lines
375 B
JavaScript
export default function validateEnvironmentVariables(environmentVariables) {
|
||
if (!environmentVariables) {
|
||
return {};
|
||
}
|
||
|
||
for (const value of Object.values(environmentVariables)) {
|
||
if (typeof value !== 'string') {
|
||
throw new TypeError('The ’environmentVariables’ configuration must be an object containing string values.');
|
||
}
|
||
}
|
||
|
||
return environmentVariables;
|
||
}
|