Skip to content

Commit 8418fde

Browse files
authored
Merge pull request #127 from Chrilleweb/cmn/loadConfigPath
Shortened config file path in CLI output to show only the filename.
2 parents 41e8fcc + 52cb85e commit 8418fde

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ This project follows [Keep a Changelog](https://keepachangelog.com/) and [Semant
1313

1414
- Updated dependencies to latest versions.
1515
- Moved `healthScore` further down on the console output for better visibility of issues.
16+
- Shortened config file path in CLI output to show only the filename.
1617

1718
### Fixed
1819

src/ui/shared/printConfigStatus.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
import chalk from 'chalk';
2+
import path from 'path';
23

34
/**
45
* Prints message when dotenv-diff.config.json is successfully loaded.
5-
* @param path Path to the config file
6+
* @param filePath The path to the loaded config file
67
* @returns void
78
*/
8-
export function printConfigLoaded(path: string): void {
9+
export function printConfigLoaded(filePath: string): void {
10+
const fileName = path.basename(filePath);
11+
912
console.log();
10-
console.log(`${chalk.cyan('🧩 Loaded config:')} ${chalk.dim(path)}`);
13+
console.log(`${chalk.cyan('🧩 Loaded config:')} ${chalk.dim(fileName)}`);
1114
}
1215

1316
/**

0 commit comments

Comments
 (0)