Skip to content

Commit

Permalink
Fix filename extraction when relative path is given
Browse files Browse the repository at this point in the history
  • Loading branch information
samirsilwal committed Oct 11, 2024
1 parent 0b78470 commit a90bd8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export function getSqlBasePath(config: Configuration): string {
export async function loadConfig(configFilename: string = CONFIG_FILENAME): Promise<Configuration> {
log('Resolving config file.');
const isAbsolutePath = path.isAbsolute(configFilename);
const filename = isAbsolutePath ? path.parse(configFilename).base : configFilename;
const filename = path.parse(configFilename).base;
const match = filename.match(CONFIG_FILE_CONVENTION) || filename === CONFIG_FILENAME;

if (!match) {
Expand Down

0 comments on commit a90bd8b

Please sign in to comment.