Skip to content

Commit

Permalink
Fixed issue sindresorhus#273 - Firefox private window
Browse files Browse the repository at this point in the history
  • Loading branch information
spneshaei committed Jan 29, 2022
1 parent 7579417 commit 8958528
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,21 @@ const openApp = (name, options) => {
throw new TypeError('Expected `appArguments` as Array type');
}

if (name == 'firefox' && appArguments.includes('-private')) {
newAppArguments = appArguments.filter(argument => {
argument != '-private'
});
newAppArguments.push('--incognito');

return baseOpen({
...options,
app: {
name,
arguments: newAppArguments
}
});
}

return baseOpen({
...options,
app: {
Expand Down

0 comments on commit 8958528

Please sign in to comment.