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

[Question] I do not understand below error #49

Closed
soroshsabz opened this issue Aug 3, 2023 · 5 comments
Closed

[Question] I do not understand below error #49

soroshsabz opened this issue Aug 3, 2023 · 5 comments

Comments

@soroshsabz
Copy link

soroshsabz commented Aug 3, 2023

ITNOA

Hi

I do not understand my error

Run cake-build/cake-action@v1
dotnet tool install --tool-path tools Cake.Tool
You can invoke the tool using the following command: dotnet-cake
Tool 'cake.tool' (version '3.1.0') was successfully installed.
tools/dotnet-cake Build/linux-build.cake --target=JustBuild --verbosity=Diagnostic --version=0.1.0

Error: Flags cannot be assigned a value.

       Build/linux-build.cake --target=JustBuild --verbosity=Diagnostic 
--version=0.1.0
                                                                        
^^^^^^^^^ Can't assign value

Can you help me?

My project is BSVN/IpTables.Api#2

@augustoproiete
Copy link
Member

version is currently a reserved argument that is used by the Cake runner to see what is the version of the Cake runner itself. See more details on cake-build/cake#3279 which aims to make it possible to use version in the future.

e.g. dotnet cake --version shows you the version of the Cake runner.

You will have to use a build argument with a different name - other than version

@soroshsabz
Copy link
Author

@augustoproiete

thanks a lot :)

@devlead
Copy link
Member

devlead commented Aug 3, 2023

With current version you can use the -- syntax similar to standard dotnet cli commands to pass argument just to script, i.e.
Example this script

Information(Argument<string>("version"));

you can pass version by using --

dotnet cake .\version.cake -- --version=1.1.1

will output

1.1.1

@augustoproiete
Copy link
Member

@devlead I don't believe this is possible in his scenario because he does not have control over the command-line being executed... He's using the GitHub Action for Cake which is crafting the command-line.

We should release a new version of this GHA that allows for that to work.

@ecampidoglio
Copy link
Member

We should release a new version of this GHA that allows for that to work.

I'll look into it.

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

No branches or pull requests

4 participants