mirror of
https://github.com/github/codeql-action.git
synced 2025-12-27 01:30:10 +08:00
17 lines
422 B
JavaScript
17 lines
422 B
JavaScript
'use strict';
|
||
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;
|
||
}
|
||
|
||
module.exports = validateEnvironmentVariables;
|