Replace safeLoad with load

This commit is contained in:
Edoardo Pirovano 2021-07-27 22:12:26 +01:00
parent fde64716e1
commit 05fc5a885c
No known key found for this signature in database
GPG key ID: 047556B5D93FFE28
12 changed files with 36 additions and 36 deletions

4
lib/config-utils.js generated
View file

@ -723,7 +723,7 @@ function getLocalConfig(configFile, workspacePath) {
if (!fs.existsSync(configFile)) {
throw new Error(getConfigFileDoesNotExistErrorMessage(configFile));
}
return yaml.safeLoad(fs.readFileSync(configFile, "utf8"));
return yaml.load(fs.readFileSync(configFile, "utf8"));
}
async function getRemoteConfig(configFile, apiDetails) {
// retrieve the various parts of the config location, and ensure they're present
@ -751,7 +751,7 @@ async function getRemoteConfig(configFile, apiDetails) {
else {
throw new Error(getConfigFileFormatInvalidMessage(configFile));
}
return yaml.safeLoad(Buffer.from(fileContents, "base64").toString("binary"));
return yaml.load(Buffer.from(fileContents, "base64").toString("binary"));
}
/**
* Get the file path where the parsed config will be stored.