fix: include quotes around env name

This commit is contained in:
Alexis Tyler
2021-05-18 14:14:08 +09:30
parent 34a03354bf
commit a87bd9255f
+4 -4
View File
@@ -172,7 +172,7 @@ const commands = {
<-----UNRAID-API-REPORT----->
Environment: ${environment}
Node API version: ${version} (${unraidApiPid ? 'running' : 'stopped'})
Unraid version: ${unraidVersion}
Unraid version: ${unraidVersion}
</----UNRAID-API-REPORT----->
`);
},
@@ -189,18 +189,18 @@ const commands = {
console.info('Switching env to "production"...');
// Default back to production
await fs.promises.writeFile(envFilePath, 'env=production');
await fs.promises.writeFile(envFilePath, 'env="production"');
return;
}
// Switch from staging to production
if (currentEnv === 'staging') {
await fs.promises.writeFile(envFilePath, 'env=production');
await fs.promises.writeFile(envFilePath, 'env="production"');
}
// Switch from production to staging
if (currentEnv === 'staging') {
await fs.promises.writeFile(envFilePath, 'env=staging');
await fs.promises.writeFile(envFilePath, 'env="staging"');
}
// Restart the process