Skip to content

Commit

Permalink
fix: remove unwanted update cleanup console error log in mac
Browse files Browse the repository at this point in the history
  • Loading branch information
abose committed Sep 13, 2024
1 parent 0607146 commit 8f91a54
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/extensionsIntegrated/appUpdater/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -421,14 +421,16 @@ define(function (require, exports, module) {
window.fs.getTauriPlatformPath(entries[0].fullPath));
}

function _cleanExtractedFolderSilent() {
function _cleanExtractedFolderSilent(logError) {
return new Promise(resolve=>{
const appdataDir = window._tauriBootVars.appLocalDir;
let extractPlatformPath = path.join(appdataDir, 'installer', "extracted");
const extractedVirtualPath = window.fs.getTauriVirtualPath(extractPlatformPath);
let directory = FileSystem.getDirectoryForPath(extractedVirtualPath);
directory.unlinkAsync()
.catch(console.error)
.catch(err=>{
logError && console.error(`Error cleaning up ${extractedVirtualPath}`, err);
})
.finally(resolve);
});
}
Expand All @@ -454,7 +456,7 @@ define(function (require, exports, module) {
throw new Error("Update script exit with non-0 exit code: " + result.code);
}
// now remove the original .app
await _cleanExtractedFolderSilent();
await _cleanExtractedFolderSilent(true);
}

let installerLocation;
Expand Down

0 comments on commit 8f91a54

Please sign in to comment.