Add a new function used to determine where to retrieve config from

This commit is contained in:
Sam Partington
2020-06-24 16:15:25 +01:00
parent f4cf65ca2d
commit 153a598a97
6 changed files with 40 additions and 2 deletions

8
lib/config-utils.js generated
View File

@@ -219,6 +219,14 @@ function initConfig() {
}
return config;
}
function isLocal(configPath) {
// If the path starts with ./, look locally
if (configPath.indexOf("./") === 0) {
return true;
}
return (configPath.indexOf("@") === -1);
}
exports.isLocal = isLocal;
function getConfigFolder() {
return util.getRequiredEnvParam('RUNNER_TEMP');
}