Skip to content

Commit 171c1ca

Browse files
committedApr 4, 2022
fix: cwd
1 parent 0cd600b commit 171c1ca

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed
 

‎src/commands/AddReferencesCommand.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ export class AddReferencesCommand implements yargs.CommandModule<object, command
1010

1111
cwd = process.cwd();
1212

13+
constructor() {
14+
this.builder = this.builder.bind(this);
15+
this.handler = this.handler.bind(this);
16+
}
17+
1318
builder(args: yargs.Argv) {
1419
return args
1520
.usage(`Usage: $0 ${this.command} --dataSource <path> [options]`)
@@ -46,8 +51,8 @@ export class AddReferencesCommand implements yargs.CommandModule<object, command
4651
});
4752
}
4853

49-
handler = async (args: commandArgs) => {
50-
const cwd = this.cwd ?? process.cwd();
54+
async handler(args: commandArgs) {
55+
const cwd = this.cwd;
5156
let addedMigrationFiles: string[] = [];
5257
let addedEntityFiles: string[] = [];
5358
let addedSubscriberFiles: string[] = [];

0 commit comments

Comments
 (0)
Please sign in to comment.