question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Default Value in CLI Showing Incorrectly

See original GitHub issue

I have the specified custom symbol:

    "StyleCop": {
      "type": "parameter",
      "datatype": "bool",
      "description": "Adds and enforces StyleCop analysers. NOTE: You may need to sort using statements if you enable this due to limitations in the dotnet new templating engine.",
      "defaultValue": "false"
    },

However, when I check the help menu in the CLI using dotnet new api --help, I see that it looks like the default is true because it has a star beside it.

image

This was reported to me as a bug in https://github.com/Dotnet-Boxed/Templates/issues/758.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
AR-Maycommented, Oct 30, 2020

As was agreed with PM, I fixed the help message such that for normal behavior of the boolean switch no unnecessary/confusing information is shown. If and only if the “default if the option is without value” is unusual, the more verbose message will be shown.

1reaction
KathleenDollardcommented, Sep 14, 2020

These having different defaults feels wrong:

  1. We may not use --parameter.
  2. We may use --parameter without any value.

Let’s get Posix experts to weigh in on how common this is in the non-Windows world. From a Windows world, this made me cry.

I’d like to put this on the backlog for 5.0.200 so we have time to think through the behavior and how we want to express this.

@jonsequitur

Read more comments on GitHub >

github_iconTop Results From Across the Web

Incorrect default value · Issue #1733 · remkop/picocli
The test provided shows that, under certain conditions, incorrect clearing of command option values occurs. test2 fails because after test1 ...
Read more >
Compilation error with default command line argument value
As I try to take a command line argument of type uint64, when I am setting default value to a valid unsigned 64...
Read more >
awk - Why is my command giving wrong output?
I m trying to output lines if col 1 has digit value , but its not working. My sample file doesn't have digit...
Read more >
Troubleshoot AWS CLI errors - AWS Command Line Interface
Diagnose and fix common AWS Command Line Interface (AWS CLI) errors. ... Check your command for spelling and formatting errors.
Read more >
How can I reset $PATH to its default value in Ubuntu?
The answer to your question is: PATH=$(getconf PATH). and works on any POSIX compliant system. The selected answer is the correct way to ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found