Skip to content

Commit

Permalink
Fixed config import and config option
Browse files Browse the repository at this point in the history
  • Loading branch information
halvardssm committed Jun 18, 2021
1 parent ee92aca commit 0dc951c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions cli/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,16 @@ import {
CliffyToggle,
exists,
format,
fromFileUrl,
resolve,
} from "../deps.ts";
import { arrayIsUnique, getLogger, isMigrationFile, isUrl } from "./utils.ts";
import {
arrayIsUnique,
getLogger,
isFileUrl,
isMigrationFile,
isUrl,
} from "./utils.ts";
import type {
CommandOptions,
FileEntryT,
Expand Down Expand Up @@ -66,7 +73,7 @@ export class State {
? options.config
: "file://" + resolve(Deno.cwd(), options.config);

if (!await exists(path)) {
if (!isFileUrl(path) && !(await exists(fromFileUrl(path)))) {
throw new NessieError(`Config file is not found at ${path}`);
}

Expand Down
2 changes: 1 addition & 1 deletion types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export interface NessieConfig {
*/
additionalSeedFiles?: string[];
/** Enables verbose output for debugging */
debug: boolean;
debug?: boolean;
}

export interface AbstractClientOptions<Client> {
Expand Down

0 comments on commit 0dc951c

Please sign in to comment.