Skip to content

Commit

Permalink
fix: 🐞 support absolute config file path
Browse files Browse the repository at this point in the history
support absolute config file path
  • Loading branch information
Tal Rofe committed Jul 3, 2022
1 parent 7493ca3 commit 699bdce
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/modules/configuration/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ const StartConfiguration = async (
let result: CosmiconfigResult | null;

if (configFilePath) {
const configAbsolutePath = path.join(process.cwd(), configFilePath);
const isPathAbsolute = path.isAbsolute(configFilePath);
const configAbsolutePath = isPathAbsolute ? configFilePath : path.join(process.cwd(), configFilePath);

result = await explorer.load(configAbsolutePath).catch(() => null);
} else {
Expand Down

0 comments on commit 699bdce

Please sign in to comment.