Prevent downloading the daemon if it's not necessary #1798

Closed
neb-b wants to merge 6 commits from fix-build into master
2 changed files with 10 additions and 1 deletions
Showing only changes of commit fc3c7fd94d - Show all commits

View file

@ -68,7 +68,16 @@ const downloadDaemon = targetPlatform =>
.then(() => del(`${daemonFilePath}*`))
.then(() => decompress(tmpZipPath, daemonDir, {
filter: file =>
path.basename(file.path).replace(path.extname(file.path), '') === daemonFileName,
path.basename(file.path) === daemonFileName,
}))
.then(() => {
console.log('\x1b[32msuccess\x1b[0m Daemon downloaded!');
if (hasDaemonVersion) {
del(daemonVersionPath);
}
fs.writeFileSync(daemonVersionPath, daemonVersion, "utf8")
resolve('Done');
})
)
.then(() => {

View file