Skip to content

Commit

Permalink
fix: add log for config reader failiure
Browse files Browse the repository at this point in the history
  • Loading branch information
Qu4k committed Jun 11, 2020
1 parent 66dc595 commit 4b4df06
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,6 @@ async function readYaml(file: string): Promise<unknown> {
* from: deno-nessie
*/
export const parsePath = (...path: string[]): string => {
if (
path.length === 1 &&
(path[0]?.startsWith("http://") || path[0]?.startsWith("https://"))
) {
return path[0];
}
return "file://" + resolve(...path);
};

Expand All @@ -123,6 +117,7 @@ async function importConfig(
const configRaw = await import(parsePath(file));
return configRaw.default as Partial<DenonConfig>;
} catch (error) {
log.info(error.message ?? "Error opening ts config config");
return;
}
}
Expand Down

0 comments on commit 4b4df06

Please sign in to comment.