-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default port should be used if port
is empty/invalid
#110
Comments
I'd say this works as intended; if $ if [ $PORT ]; then budo --port $PORT; else budo; fi I'm not sure what the error looks like you're getting, if it's unclear we could perhaps improve that? Cheers! |
Also to clarify: setting variables before running the script works:
$ foo='bar' npm run foo
bar |
Yeah typically CLIs will error out when you pass undefined stuff. I think we could add a clearer error message. |
use default ports if empty/invalid (fixes #110)
Seems like a pretty legitimate use case, I've run into similar issues with Unix stuff not working in Windows. Should be merged in latest, I'll cut a new release soon. |
Going to reopen this while we figure out another way to allow user-override port/host in a cross-platform manner. |
use default ports if empty/invalid (fixes #110)
I want to allow folks to spawn
budo
with a custom default port (instead of9966
) like this:But this won't work:
budo
tries to parse the empty string withparseInt
and theNaN
gets passed as an (invalid) port, thereby preventingbudo
from starting the server.The text was updated successfully, but these errors were encountered: