Skip to content
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

unexpected argument --version found #1301

Closed
chenrui333 opened this issue Jun 17, 2023 · 4 comments · Fixed by #1305
Closed

unexpected argument --version found #1301

chenrui333 opened this issue Jun 17, 2023 · 4 comments · Fixed by #1305

Comments

@chenrui333
Copy link

🐛 Bug description

While trying to upgrade wasm-pack to 1.2.0, we found that the --version regression test failed

$ /opt/homebrew/Cellar/wasm-pack/0.12.0/bin/wasm-pack --version
error: unexpected argument '--version' found

  tip: a similar argument exists: '--verbose'

Usage: wasm-pack <--verbose...|--quiet|--log-level <LOG_LEVEL>> <COMMAND>

For more information, try '--help'.

🤔 Expected Behavior

The version check should pass

👟 Steps to reproduce

just a cargo install build and run the --version check against the built binary

🌍 Your environment

Include the relevant details of your environment.
wasm-pack version:
rustc version: rustc 1.70.0 (90c541806 2023-05-31) (built from a source tarball)

@chenrui333
Copy link
Author

This is the --help

$ /opt/homebrew/Cellar/wasm-pack/0.12.0/bin/wasm-pack --help
📦 ✨  pack and publish your wasm!

Usage: wasm-pack [OPTIONS] <COMMAND>

Commands:
  build    🏗️  build your npm package!
  pack     🍱  create a tar of your npm package but don't publish!
  new      🐑 create a new project with a template
  publish  🎆  pack up your npm package and publish!
  login    👤  Add an npm registry user account! (aliases: adduser, add-user)
  test     👩‍🔬  test your wasm!
  help     Print this message or the help of the given subcommand(s)

Options:
  -v, --verbose...             Log verbosity is based off the number of v used
  -q, --quiet                  No output printed to stdout
      --log-level <LOG_LEVEL>  The maximum level of messages that should be logged by wasm-pack. [possible values: info, warn, error] [default: info]
  -h, --help                   Print help

@ThatOneBro
Copy link

Just noticed this too

@lynn
Copy link
Contributor

lynn commented Jun 19, 2023

+1, I was using wasm-pack --version in a build script to check the right version of wasm-pack is installed.

$ wasm-pack --version    # before
wasm-pack 0.11.0
$ wasm-pack --version    # after installing 0.12
error: unexpected argument '--version' found

  tip: a similar argument exists: '--verbose'
...

@billti
Copy link

billti commented Jun 19, 2023

Yeah, not to pile on but this broke our CI over the weekend too (below). Currently we run https://rustwasm.github.io/wasm-pack/installer/init.sh to install, which maybe isn't a good practice. Is there a way this script can pin to a version?

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants