Olivier Massot hace 2 años
padre
commit
284e64f277
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  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`);