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

Improve error message for reserved argument names #2794

Open
augustoproiete opened this issue Jun 7, 2020 · 1 comment
Open

Improve error message for reserved argument names #2794

augustoproiete opened this issue Jun 7, 2020 · 1 comment

Comments

@augustoproiete
Copy link
Member

It seems that some argument names cannot be used as build arguments. For example, trying to use an argument called version throws the error Error: Argument value is not a valid boolean value.

build.cake

var version = Argument<string>("version", "1.0.0");
// ...

image

I'm guessing this is caused because version is already being used to show the tool version e.g. dotnet cake --version, which is reasonable.

However, it's not clear from the error message above why the error occurs. I'd suggest adding a validation and display a better error message and suggest a workaround such as "Use a different name such as appVersion, packageVersion, etc."


Using dotnet cake global tool v0.38.1

@FrankRay78
Copy link
Contributor

The above error message no longer happens in Cake 2.2.0, see:

image

As it's much clearer and self-explanatory, I suggest this issue could be considered obsolete and closed.

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.

2 participants