Skip to content

Commit

Permalink
fix: not handling error on fixing rights Nouvelle initialisation de l…
Browse files Browse the repository at this point in the history
…'application #47
  • Loading branch information
hrenaud committed Aug 31, 2024
1 parent 7984893 commit d654098
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions electron-app/ecoindex-app/src/main/handlers/Initalization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,19 @@ export const initialization = async (
initializedDatas.initSudoFixNpmDirRights =
getSudoFixNpmDirRightsReturned.result as boolean
mainLog.log(getSudoFixNpmDirRightsReturned)
if (getSudoFixNpmDirRightsReturned.error) {
const cantFixUserRights = new ConfigData(
'app_can_not_be_launched',
'error_type_cant_fix_user_rights'
)
cantFixUserRights.error = `Error on fixing user rights`
cantFixUserRights.message = `Need to fix user rights on ${os.platform()}`
getMainWindow().webContents.send(
channels.INITIALIZATION_DATAS,
cantFixUserRights
)
return false
}
} else if (
os.platform() !== 'darwin' &&
!initializedDatas.initPluginCanInstall
Expand Down

0 comments on commit d654098

Please sign in to comment.