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

Casing causes 'More than one build script specified.' message #1690

Closed
kharlamov opened this issue Jul 19, 2017 · 13 comments
Closed

Casing causes 'More than one build script specified.' message #1690

kharlamov opened this issue Jul 19, 2017 · 13 comments
Milestone

Comments

@kharlamov
Copy link

I switched from windows (ps1) to mac (sh), and noticed that using commands such as -T or -Target on the shell script it causes the following issue More than one build script specified. After a while I noticed it was just a casing issue -t worked just fine. Is there anyway to get some better notification or just to ignore casing for this?

@patriksvensson
Copy link
Member

@kharlamov Command line options are case sensitive in bash, so this is by design.

@kharlamov
Copy link
Author

I guess that part makes sense, the weird part to me was the side effect when the command is wrong More than one build script specified.? However, thats no big deal now that I know, thank you.

@patriksvensson
Copy link
Member

@kharlamov That message is coming from Cake's parser so that we might want to look closer at.

Would you mind specifying what OS you're running on, which Cake version and what the command looks like to get this error?

@kharlamov
Copy link
Author

Sure, I am using mac OS X 10.12.5 with the latest version of cake.

@devlead
Copy link
Member

devlead commented Oct 1, 2017

@kharlamov can you supply the command line used that causes the error?

@tuyen-vuduc
Copy link

I faced the same issue when running scripts cloned from this repo https://github.com/xamarin/AndroidSupportComponents.

The running script is

exec mono ./tools/Cake/Cake.exe build.cake --target libs

Without --target libs, this issue will be gone; however, that's a custom argument of the script.

@devlead
Copy link
Member

devlead commented Dec 26, 2017

When invoking Cake directly the syntax would be:
exec mono ./tools/Cake/Cake.exe build.cake --target=libs

@gldraphael
Copy link

gldraphael commented Nov 6, 2018

Able to reproduce this on MacOS 10.14 (18A391) with:

./build.sh --target build

Also tried -t, -target, -T, -Target, --Target, but they don't work.

Edit:

Had to use = like:

./build.sh --target=build

@HofmeisterAn
Copy link

Can confirm this issue, reproduce on Mac OS 10.14.1 (18B75).

@Preetham-P
Copy link

Able to reproduce this on MacOS 10.14 (18A391) with:

./build.sh --target build

Also tried -t, -target, -T, -Target, --Target, but they don't work.

Edit:

Had to use = like:

./build.sh --target=build

This Worked for me

@dem4gus
Copy link

dem4gus commented May 20, 2020

I think part of the problem is the documentation is not clear, especially when running a Bash script as opposed to PowerShell. The doc page about running targets gives these examples:

./build.ps1 -Target Publish

./build.ps1 --target Publish --exclusive

If the tool is going to claim to be cross-platform like it does on the home page then the documentation should be cross-platform as well.

@augustoproiete
Copy link
Member

augustoproiete commented Feb 4, 2021

The .NET Tool runner is now the recommended way to run Cake scripts on all platforms, the bootstrapping became a lot simpler (a handful of lines of code) and the documentation on the website has been updated.

Closing this as resolved as part of the 1.0.0 milestone. Feel free to reopen if needed.

@cake-build-bot
Copy link

🎉 This issue has been resolved in version v1.0.0 🎉

The release is available on:

Your GitReleaseManager bot 📦🚀

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

No branches or pull requests

10 participants