Skip to content

Commit

Permalink
added directory typing
Browse files Browse the repository at this point in the history
  • Loading branch information
pleerock committed Sep 4, 2020
1 parent a50e09a commit df70dc3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/commands/MigrationCreateCommand.ts
Expand Up @@ -45,7 +45,7 @@ export class MigrationCreateCommand implements yargs.CommandModule {
const timestamp = new Date().getTime();
const fileContent = MigrationCreateCommand.getTemplate(args.name as any, timestamp);
const filename = timestamp + "-" + args.name + ".ts";
let directory: string = args.dir;
let directory = args.dir as string;

// if directory is not set then try to open tsconfig and find default path there
if (!directory) {
Expand All @@ -55,7 +55,7 @@ export class MigrationCreateCommand implements yargs.CommandModule {
configName: args.config as any
});
const connectionOptions = await connectionOptionsReader.get(args.connection as any);
directory = connectionOptions.cli ? connectionOptions.cli.migrationsDir : undefined;
directory = connectionOptions.cli ? (connectionOptions.cli.migrationsDir || "") : "";
} catch (err) { }
}

Expand Down

0 comments on commit df70dc3

Please sign in to comment.