-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
SvelteKit cli overlapping parameter shortcut -h #1432
Comments
I had thought about simply removing the '-h' shortcut for '--help' as a proposed solution but when I look in to it, although the cmd line opts are set here: Line 75 in c6fde99
the https://github.com/lukeed/sade/blob/89f7377442a38fa90e51abf4f953e14af0f2f2cf/lib/utils.js#L44 |
This was introduced in #834 Given -p, --port Port (default 3000)
- -h, --host Host (only use this on trusted networks) (default localhost)
+ -H, --host Host (only use this on trusted networks) (default localhost)
- -H, --https Use self-signed HTTPS certificate (default false)
+ -S, --https Use self-signed HTTPS certificate (default false)
-o, --open Open a browser tab (default false)
-h, --help Displays this message This aligns with Sade docs which has examples with Noteably, Vite doesn't have aliases for it's |
I'm used to |
I think |
Then again, it's a tricky breaking change (if someone was already using |
* remove -H and -h shortcuts from CLI - fixes #1432 * make the breaking change explicit
Describe the bug
The "svelte-kit" cli commands dev, preview and start have overlapping parameter shortcuts for the host parameter and the help, both shortcuts are
-h
. When using the shortcut, the help is always displayed and the command exits.(Using
--host
instead works)Logs
To Reproduce
npx svelte-kit dev -ho
in any SvelteKit project.Expected behavior
The development server starts, binds to 0.0.0.0 because of the
-h
parameter and launches the browser-o
Information about your SvelteKit Installation:
Diagnostics
System:
OS: Linux 5.4 Ubuntu 18.04.5 LTS (Bionic Beaver)
CPU: (8) x64 AMD FX(tm)-8350 Eight-Core Processor
Memory: 790.58 MB / 11.68 GB
Container: Yes
Shell: 5.4.2 - /usr/bin/zsh
Binaries:
Node: 14.16.1 - ~/.nvm/versions/node/v14.16.1/bin/node
npm: 6.14.12 - ~/.nvm/versions/node/v14.16.1/bin/npm
Browsers:
Firefox: 88.0.1
npmPackages:
@sveltejs/kit: next => 1.0.0-next.107
svelte: ^3.34.0 => 3.38.2
vite: ^2.2.4 => 2.3.1
Severity
Low,
--host
parameter can be used instead, just a small annoyance which might confuse users.The text was updated successfully, but these errors were encountered: