Skip to content

I can no longer pass empty string as argument values #3198

Answered by nils-a
mattleibow asked this question in Q&A
Discussion options

You must be logged in to vote

@mattleibow as said, this is a feature - or rather it's side effect of Cake 1.0.0 being able to accept flags in addition to key-value-arguments.

@devlead described it in stack overflow

One key difference with Cake 1.0.0 is that it beyond keyvalue arguments (--key=value), supports flags (--flag), and multiple arguments with the same name (--key=value1 --key=value2). Which allows for much more flexibility than before.

As to you're question in gitter:

But this is not quite the same, I am passing a string, and empty string.
Unless this is equivalent and I can do --name ""

No, that's not equivalent.
You'd have to supply a default in your Cake file. Like so:

var prefix = Argument<string>("p…

Replies: 2 comments 13 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by augustoproiete
Comment options

You must be logged in to vote
13 replies
@RusKnyaz
Comment options

@nick5454
Comment options

@nick5454
Comment options

@augustoproiete
Comment options

@nick5454
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
8 participants
Converted from issue

This discussion was converted from issue #3197 on February 24, 2021 21:46.