Skip to content
This repository was archived by the owner on Aug 17, 2022. It is now read-only.

Commit 2498871

Browse files
committed
windows fix
1 parent 2b9a659 commit 2498871

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

bin/makemigration.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,14 @@ if (options.help)
3232
process.exit(0);
3333
}
3434

35-
let {migrationsDir, modelsDir} = pathConfig(options);
35+
if(!process.env.PWD){
36+
process.env.PWD = process.cwd()
37+
}
38+
39+
const {
40+
migrationsDir,
41+
modelsDir
42+
} = pathConfig(options);
3643

3744
// current state
3845
const currentState = {

bin/runmigration.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,14 @@ const optionDefinitions = [
2020

2121
const options = commandLineArgs(optionDefinitions);
2222

23-
let {migrationsDir, modelsDir} = pathConfig(options);
23+
if(!process.env.PWD){
24+
process.env.PWD = process.cwd()
25+
}
26+
27+
let {
28+
migrationsDir,
29+
modelsDir
30+
} = pathConfig(options);
2431

2532
if (options.help)
2633
{

0 commit comments

Comments
 (0)