Skip to content

Commit 279702f

Browse files
committed
fixed auto updater
1 parent bcd9d1a commit 279702f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "simplelauncher",
3-
"version": "0.4.0",
3+
"version": "0.4.1",
44
"description": "Launcher for SimpleClient",
55
"main": "src/main.js",
66
"scripts": {

src/updater.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@ const update = async () => setTimeout(() => fetch(`https://api.github.com/repos/
4545
spawn('curl', ['-L', json.assets[0].browser_download_url, '-o', join(dir, json.assets[0].name)]).on('exit', () => {
4646
log('Successfully downloaded update')
4747
log('Installing update...')
48-
execFile(join(dir, json.assets[0].name), {shell: true}).unref()
48+
spawn('start', [join(dir, json.assets[0].name)], {shell: true, detached: true}).unref()
4949
exit(0)
5050
})
5151
} else if (platform() == 'linux') {
5252
log('Downloading update...')
5353
spawn('curl', ['-L', json.assets[0].browser_download_url, '-o', join(dir, json.assets[1].name)]).on('exit', () => {
5454
log('Successfully downloaded update')
5555
log('Installing update...')
56-
execFile(join(dir, json.assets[0].name), {shell: true}).unref()
56+
spawn(join(dir, json.assets[0].name), {shell: true, detached: true}).unref()
5757
exit(0)
5858
})
5959
}

0 commit comments

Comments
 (0)