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

Correct relaunch logic #11838

Merged
merged 1 commit into from
Nov 10, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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