Skip to content

Commit cc46463

Browse files
committed
Attempt to fix Circle CI locating knexfile due to NODE_ENV being set
1 parent a10acf5 commit cc46463

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

test/knexfile.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module.exports = {
1+
var config = {
22
client: process.env.DB_CLIENT || 'mysql',
33
connection: {
44
host: process.env.DB_HOST || 'localhost',
@@ -9,4 +9,11 @@ module.exports = {
99
tableName: 'migrations'
1010
},
1111
debug: process.env.DEBUG || false
12-
}
12+
}
13+
14+
// Workaround for knex not playing well with nconf
15+
if (process.env.NODE_ENV) {
16+
config = { [process.env.NODE_ENV]: config }
17+
}
18+
19+
module.exports = config;

0 commit comments

Comments
 (0)