Skip to content

Commit db76151

Browse files
committed
Improve: Terminal output for reading the config file
1 parent e7fcc08 commit db76151

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/techor/src/index.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ export default class Techor<Options extends TechorOptions<Config>, Config> {
1414
this.options = extend(defaultOptions, ...options) as Options
1515
}
1616

17-
logConfigFound = () => log.ok`**${this.options.config}** config file found`
18-
logConfigNotFound = () => log.i`No **${this.options.config}** config file found`
17+
logConfigFound = (configPath: string) => log.ok`**${configPath}** config file found`
18+
logConfigNotFound = (configPath: string) => log.i`No **${configPath}** config file found`
1919

2020
readConfig(key = 'config'): Config | any {
2121
const { config, cwd } = this.options
@@ -28,9 +28,9 @@ export default class Techor<Options extends TechorOptions<Config>, Config> {
2828
if (configPath) {
2929
const userConfigModule = crossImport(configPath, { cwd })
3030
userConfig = (key ? userConfigModule[key] : undefined) || userConfigModule.default || userConfigModule
31-
this.logConfigFound()
31+
this.logConfigFound(configPath)
3232
} else {
33-
this.logConfigNotFound()
33+
this.logConfigNotFound(configPath)
3434
}
3535
} catch (err) {
3636
log.error(err)

0 commit comments

Comments
 (0)