granted
granted copied to clipboard
Support browser CLI arguments
From Ralph in the Community Fate Community Slack:

is it possible to set firefox to launch with a profile? I tried to modify the config file directly like in the image, when I try to use assume -c I get this error [✘] Granted was unable to open a browser session automatically due to the following error: starting command: exec: "\Program Files\Mozilla Firefox\firefox.exe -P Work": file does not exist
We should allow additional CLI flags to be added to the browser, something like:
CustomBrowserFlags = ["-P", "Work"]
Hi!
Done a bit of work on this today; I've managed to make it work with the granted console
command, accepting a firefox-profile-name
argument to open the specified URL in the browser with the selected profile (defaulting to "default-release", which is the profile that ships with the browser). So running something like granted console -firefox-profile-name=Dean
will open Firefox with an alternate profile successfully.
Looking into making it work with assume
as that also features opening in browser, and wondering if the best way to handle this is to ask the user to set a profile name in the global config; seems a bit too specific a toggle to be in the global flags, but struggling to find a comparative way to pass it into the command such with granted
.
The AssumeCommand
function here pulls its configuration detail from the global config here
Any suggestions would be appreciated!
EDIT: added a WIP