Skip to content

Commit

Permalink
fix: remove duplicate config not found warning
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed May 18, 2021
1 parent e20ef49 commit 6b8c4bf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/config/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,14 @@ export const getConfigurationArg = (
return argv.config;
};

let warningIssued: boolean = false;
export const loadConfig = (
configPath: string,
): ConfigurationResult | undefined => {
const hasConfigFolder = fs.existsSync(configPath);
if (!hasConfigFolder) {
if (!hasConfigFolder && !warningIssued) {
console.warn('configuration folder not found', configPath);
warningIssued = true;
}
const allFiles = hasConfigFolder ? fs.readdirSync(configPath) : [];
const buildConfigFile = allFiles.find(file =>
Expand Down

0 comments on commit 6b8c4bf

Please sign in to comment.