Skip to content

Commit afc69c5

Browse files
committed
wip
1 parent d63e748 commit afc69c5

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/Script.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,23 +78,20 @@ export class Script {
7878
if (hashResp.success) {
7979
const needsUpdate = this.checkIfUpdateIsNeeded(hashResp.data);
8080

81-
console.log({ needsUpdate });
82-
8381
if (needsUpdate) {
8482
const scriptResp = await getUrl(`${baseUrl}/configure-template.js`);
8583

8684
if (scriptResp.success) {
87-
writeFileSync(`${__filename}.latest.js`, scriptResp.data, { encoding: 'utf-8' });
88-
console.log('* Updated to the latest version.');
85+
writeFileSync(`${__filename}`, scriptResp.data, { encoding: 'utf-8' });
86+
console.log('* Updated to the latest version, please re-run this script.');
87+
process.exit(0);
8988
}
9089
}
9190
}
9291
}
9392

9493
async run() {
9594
await this.updateWithLatestVersionFromGithub();
96-
console.log('done');
97-
return;
9895

9996
console.log('Retrieving github data...');
10097

0 commit comments

Comments
 (0)