Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Mar 18, 2025. It is now read-only.

Commit 51a44a0

Browse files
committed
clean up code
1 parent b3cec22 commit 51a44a0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

set-env.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ if (process.env.PRODUCTION !== undefined && process.env.CRYPTR_CONFIG !== undefi
1414
console.log(`The file '${targetPath}' will be written with the following content: \n`);
1515
console.log(envConfigFile);
1616

17-
fs.exists(`${targetPath}`, (exists: boolean) => {
17+
fs.exists('./projects/playground/src/environments/environment.prod.ts', (exists: boolean) => {
1818
if (exists) {
19-
fs.unlink(`${targetPath}`, (err: any) => {
19+
fs.unlink('./projects/playground/src/environments/environment.prod.ts', (err: Error) => {
2020
if (err) {
2121
throw err;
2222
}
23-
fs.writeFile(`${targetPath}`, envConfigFile, { flag: "wx" }, (err: any) => {
23+
fs.writeFile('./projects/playground/src/environments/environment.prod.ts', envConfigFile, { flag: "wx" }, (err: Error) => {
2424
if (err) {
25-
throw console.error(err);
25+
throw err;
2626
}
2727
})
2828
});

0 commit comments

Comments
 (0)