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

Add documentation about arguments starting with a dash (-) #4257

Closed
milanholemans opened this issue Dec 20, 2022 · 2 comments
Closed

Add documentation about arguments starting with a dash (-) #4257

milanholemans opened this issue Dec 20, 2022 · 2 comments
Assignees
Milestone

Comments

@milanholemans
Copy link
Contributor

milanholemans commented Dec 20, 2022

Reference: #4256

When executing commands where the value of an option starts with a dash -, Minimist parses all values as flags instead of a string.

E.g.: m365 planner task get --id "-9rMKQooUjZdxgv1qQVZYABEuw"
Will be parsed as:

{
  "1": true,
  "9": true,
  "id": true,
  "r": true,
  "M": true,
  "K": true,
  "Q": true,
  "o": true,
  "U": true,
  "j": true,
  "Z": true,
  "d": true,
  "x": true,
  "g": true,
  "v": true,
  "q": true,
  "V": true,
  "Y": true,
  "A": true,
  "B": true,
  "E": true,
  "u": true,
  "w": true
}

To fix this, people should use an embedded option value with an = like: m365 planner task get --id=-9rMKQooUjZdxgv1qQVZYABEuw
This way Minimist parses the values correctly and the command works as expected.

Let's add this to the 'Use the CLI' page. https://pnp.github.io/cli-microsoft365/user-guide/using-cli/

@nanddeepn
Copy link
Contributor

Can I work on this?

@milanholemans
Copy link
Contributor Author

Certainly, thanks @nanddeepn!

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

Successfully merging a pull request may close this issue.

3 participants