Skip to content

Commit

Permalink
fix: Log error if there is one from the config service (#318)
Browse files Browse the repository at this point in the history
  • Loading branch information
Robdel12 authored Aug 6, 2019
1 parent 45092c4 commit 6432b63
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/services/configuration-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ export default class ConfigurationService {
try {
const userConfigFilePath = path.join(process.cwd(), configurationFile)
const userConf = yaml.safeLoad(fs.readFileSync(userConfigFilePath, 'utf8'))
logger.debug(`Current config file path: ${userConfigFilePath}`)

// apply a deep overwrite merge to userConf and this.configuration
const overwriteMerge = (destinationArray: any, sourceArray: any, options: any) => sourceArray
this.configuration = deepmerge(this.configuration, userConf, { arrayMerge: overwriteMerge })
} catch {
logger.debug('.percy.yml configuration file not supplied or failed to be loaded and parsed.')
} catch (error) {
logger.debug(`.percy.yml configuration file not supplied or failed to be loaded and parsed: ${error}`)
}

return this.configuration
Expand Down

0 comments on commit 6432b63

Please sign in to comment.