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

Unable to install plugin - Invalid arguments, expected either 1 or 2 positional arguments, got 3 #13103

Closed
NorseGaud opened this issue Jul 9, 2024 · 3 comments
Labels

Comments

@NorseGaud
Copy link
Contributor

veertu@fast-mini-2 test-packer-plugin_master@2 % ./packer-plugin-veertu-anka_v4.0.0_x5.0_darwin_amd64 describe
2024/07/09 09:30:49 plugin version: 4.0.0+e663e38c69cb0e8e0078c891ef3ab8421fb522d7
{"version":"4.0.0+e663e38c69cb0e8e0078c891ef3ab8421fb522d7","sdk_version":"0.5.3","api_version":"x5.0","builders":["vm-clone","vm-create"],"post_processors":["registry-push"],"provisioners":[],"datasources":[]}

veertu@fast-mini-2 test-packer-plugin_master@2 % packer plugins install –path packer-plugin-veertu-anka_v4.0.0_x5.0_darwin_amd64 github.com/veertuinc/veertu-anka
Invalid arguments, expected either 1 or 2 positional arguments, got 3
Usage: packer plugins install [OPTIONS...] <plugin> [<version constraint>]

  This command will install the most recent compatible Packer plugin matching
  version constraint.
  When the version constraint is omitted, the most recent version will be
  installed.

  Ex: packer plugins install github.com/hashicorp/happycloud v1.2.3
      packer plugins install --path ./packer-plugin-happycloud "github.com/hashicorp/happycloud"

Options:
  -path <path>                  Install the plugin from a locally-sourced plugin binary.
                                This installs the plugin where a normal invocation would, but will
                                not try to download it from a remote location, and instead
                                install the binary in the Packer plugins path. This option cannot
                                be specified with a version constraint.
  -force                        Forces reinstallation of plugins, even if already installed.

What am I misunderstanding about this?

@NorseGaud NorseGaud added the bug label Jul 9, 2024
@lbajolet-hashicorp
Copy link
Contributor

Hi @NorseGaud,

It looks like the - character you used for the flag isn't the one expected? Maybe it's a quirk of your terminal, but it seems that in the example you shared, the - character is a U+2013 EN-DASH (0xe2 0x80 0x93 in UTF-8) instead of a U+002D HYPHEN-MINUS (0x2d in UTF-8).

Changing this in my local terminal fixes the issue, could you confirm?

@NorseGaud
Copy link
Contributor Author

Son of a... That was it! Thanks @lbajolet-hashicorp !

Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants