Skip to content

Commit

Permalink
refactor: Update logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
darkobits committed Jun 27, 2023
1 parent 00b58a2 commit 7555e2d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 1 addition & 3 deletions src/lib/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,6 @@ export default function buildCommand<
});

if (configResult) {
log.verbose(`Loaded configuration file from ${log.chalk.green(configResult.filepath)}.`);

if (configResult.config) {
context.config = camelcaseKeys<any, any>(configResult.config, { deep: true });
}
Expand All @@ -147,7 +145,7 @@ export default function buildCommand<
}
});
} else {
log.warn(log.prefix('loadConfiguration'), `Cannot merge configuration of type "${typeof configResult.config}" with arguments.`);
log.warn(log.prefix('handler'), `Auto-configuration is enabled, but the command's arguments (type "object") cannot merged with configuration of type "${typeof configResult.config}".`);
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/lib/configuration/loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import { getPackageInfo } from 'lib/package';
export default async function configurationLoader(filePath: string /* , content: string */) {
const errors: Array<Error> = [];

log.verbose(log.prefix('configurationLoader'), `Using configuration file: ${log.chalk.green(filePath)}`);

const pkgInfo = getPackageInfo({ cwd: path.dirname(filePath) });
if (!pkgInfo?.root) throw new Error(`${log.prefix('configurationLoader')} Unable to compute host package root directory.`);

Expand Down

0 comments on commit 7555e2d

Please sign in to comment.