Olivier Massot 2 年 前
コミット
284e64f277
1 ファイル変更2 行追加2 行削除
  1. 2 2
      env/setupEnv.mjs

+ 2 - 2
env/setupEnv.mjs

@@ -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`);