Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Merge pull request #11838 from brave/issue-11821
Browse files Browse the repository at this point in the history
Correct relaunch logic
  • Loading branch information
bsclifton committed Nov 10, 2017
2 parents 81df03b + 6e4b725 commit 2674950
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
9 changes: 6 additions & 3 deletions app/windowsInit.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,16 @@ if (process.platform === 'win32') {
}

const userDataDirSwitch = '--user-data-dir-name=brave-' + channel
if (channel && channel !== 'dev' && !process.argv.includes(userDataDirSwitch)) {
if (channel !== 'dev' && !process.argv.includes(userDataDirSwitch) &&
!process.argv.includes('--relaunch') &&
!process.argv.includes('--user-data-dir-name=brave-development')) {
delete process.env.CHROME_USER_DATA_DIR
if (cmd === '--squirrel-firstrun') {
app.relaunch({args: [userDataDirSwitch, '--relaunch']})
} else {
app.relaunch({args: process.argv.slice(1) + [userDataDirSwitch, '--relaunch']})
app.relaunch({args: process.argv.slice(1).concat([userDataDirSwitch, '--relaunch'])})
}
app.quit()
app.exit()
}
}

Expand Down
4 changes: 1 addition & 3 deletions tools/buildInstaller.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,7 @@ if (isDarwin) {
setupExe: `${appName}-Setup-${arch}.exe`
})
resultPromise.then(() => {
cmds = [
]
execute(cmds, {}, console.log.bind(null, 'done'))
console.log('done')
}, (e) => console.log(`No dice: ${e.message}`))
})
} else if (isLinux) {
Expand Down

0 comments on commit 2674950

Please sign in to comment.