|
|
@@ -37,8 +37,8 @@ const targetEnvFile = path.join(projectDir, 'env', environments[hostname])
|
|
|
const mainEnvFile = path.join(projectDir, '.env')
|
|
|
|
|
|
fs.unlink(mainEnvFile, (err) => {
|
|
|
- // 'ENOENT' is the error code for "no such file or directory"
|
|
|
- if (err && err.code === 'ENOENT') {
|
|
|
+ // 'ENOENT' is the error code for "no such file or directory", we ignore this one
|
|
|
+ if (err && err.code !== 'ENOENT') {
|
|
|
throw err
|
|
|
}
|
|
|
console.log(`${mainEnvFile} was deleted`);
|