Skip to content

Commit c84aded

Browse files
authored
Also use temp file on Windows
1 parent 7d92989 commit c84aded

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/cli.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ async function main() {
9393
fs.writeFileSync(jsPath, jsSource)
9494
urlToOpen += `#localProfilePath=${jsPath}`
9595

96-
// For some silly reason, the OS X open command ignores any query parameters or hash parameters
96+
// For some silly reason, the macOS `open` and Windows `start` commands ignore hash parameters
9797
// passed as part of the URL. To get around this weird issue, we'll create a local HTML file
9898
// that just redirects.
99-
if (process.platform === 'darwin') {
99+
if (process.platform === 'darwin' || process.platform === 'win32') {
100100
const htmlPath = path.join(os.tmpdir(), `${filePrefix}.html`)
101101
console.log(`Creating temp file ${htmlPath}`)
102102
fs.writeFileSync(htmlPath, `<script>window.location=${JSON.stringify(urlToOpen)}</script>`)

0 commit comments

Comments
 (0)