You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I run five-server with the open arg in a context where no web browser is available (a remote headless ubuntu server), the result is an infinite loop of printing out:
Could not open browser "default". Trying the default browser next.
Of course I could just set the open arg to false, but if I have a package.json file with an npm script designed to run on an end-user machine, and I happen to run this same script from a headless remote machine, it would be nice if it didn't have an infinite loop and just gave up more gracefully.
In my case, I would prefer that five-server continues to serve the content even in the event that it fails to open a browser, maybe with a warning message printing out the intended URL so that you could copy and paste it to manually open a browser, so that I could use the same script in both contexts. But I suppose that ending the job with an error code would be a reasonable behavior too unless open is set to false.
EDIT: I ended up setting up my script so that I could pass a "--headless" argument to it to control whether it opens a browser, and I'm satisfied with that, so don't worry about me. But still, the infinite loop isn't a good experience and should probably be addressed.
The text was updated successfully, but these errors were encountered:
If I run
five-server
with theopen
arg in a context where no web browser is available (a remote headless ubuntu server), the result is an infinite loop of printing out:Of course I could just set the
open
arg to false, but if I have a package.json file with an npm script designed to run on an end-user machine, and I happen to run this same script from a headless remote machine, it would be nice if it didn't have an infinite loop and just gave up more gracefully.In my case, I would prefer that
five-server
continues to serve the content even in the event that it fails to open a browser, maybe with a warning message printing out the intended URL so that you could copy and paste it to manually open a browser, so that I could use the same script in both contexts. But I suppose that ending the job with an error code would be a reasonable behavior too unlessopen
is set to false.EDIT: I ended up setting up my script so that I could pass a "--headless" argument to it to control whether it opens a browser, and I'm satisfied with that, so don't worry about me. But still, the infinite loop isn't a good experience and should probably be addressed.
The text was updated successfully, but these errors were encountered: