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.

[ACR] The --admin-enabled boolean parameter requires a value when creating a registry

See original GitHub issue

If I try running az acr create --admin-enabled, it complains about the --admin-enabled parameter needing a value. For boolean flags, which default to false, it would be nice if simply specifying them, without a value, was enough to indicate a true value.

Numerous other commands in the CLI provide this behavior (e.g. the --is-linux parameter of the az appservice plan create command), and so, consistency would be helpful for ease-of-use. Maybe this ACR behavior is the preferred way, and we should just correct other commands to be congruent. I’m cool either way, though I’d vote to not require explicitly adding true.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
tjprescottcommented, Feb 23, 2017

I definitely don’t recommend two flags. However, you can have a three state solution that works. @shhsu and I discussed the following: create

--admin-enabled  (True is implied)
--admin-enabled True (explicit)
--admin-enabled False (explicit)
(omitting is implicitly false)

update

--admin-enabled True (explicit)
--admin-enabled False (explicit)
(omitting means don't change)

In this way, you have consistency between create and update for those who value that, you have the ease of simply specifying a flag on create for those who value that, and you don’t have a breaking change.

0reactions
shhsucommented, Feb 23, 2017

Ah, this should work action=‘store’, nargs=‘?’, const=True, default=None

Read more comments on GitHub >

github_iconTop Results From Across the Web

Setting Up an Azure Container Registry
To create an Azure Container Registry, you need to create an Azure Resource ... Registry instance in your resource group by using the...
Read more >
Azure Automation Update Management Boolean Value is ...
Within Azure Automation Update Management I have a script which requires a boolean value. 8962-aasetup.png.
Read more >
Public Sector Solutions - Salesforce
Create intuitive, guided experiences that help constituents understand regulatory requirements and fill out the right forms. Apply intelligent automation to ...
Read more >
azurerm_container_registry | Resources | hashicorp/azurerm
name - (Required) Specifies the name of the Container Registry. Only Alphanumeric characters allowed. Changing this forces a new resource to be created....
Read more >
Oracle Content Management SDK Administrator's Guide
independently created software or as specified by law, is prohibited. ... Tasks That Require an Oracle CM SDK Administrator Account.
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