Bug? "More than one build script specified" when calling build.ps1 with a custom cake script and extra parameters
See original GitHub issueWhat You Are Seeing?
When I specify a custom cake script with extra parameters using the build.ps1 bootstrap file, I get the following error:
More than one build script specified.
Note: If I remove the extra parameter that I would like to pass to my script everything works
What is Expected?
Cake executes using the custom cake script file
What version of Cake are you using?
0.13.0
Are you running on a 32 or 64 bit system?
64
What environment are you running on? Windows? Linux? Mac?
Windows
Are you running on a CI Server? If so, which one?
None
How Did You Get This To Happen? (Steps to Reproduce)
.\build.ps1 -Script “3rdPartyPackages.cake” -Settings=3rdPartyPackages.settings.json
Output Log
.\build.ps1 -Script "3rdPartyPackages.cake" -Settings="3rdPartyPackages.settings.json"
Preparing to run build script (3rdPartyPackages.cake)...
Running build script...
& "E:\Projects\tools\Cake\Cake.exe" "3rdPartyPackages.cake" -target="Default" -configuration="Release" -verbosity="Verbose" -Settings=3rdPartyPackages.settin
gs\.json
More than one build script specified.
Usage: Cake.exe [build-script] [-verbosity=value]
[-showdescription] [-dryrun] [..]
Issue Analytics
- State:
- Created 7 years ago
- Comments:26 (9 by maintainers)
Top Results From Across the Web
How do I pass my own custom arguments to build.ps1?
I assume you're using the default boostrapper. If so there's a -ScriptArgs parameter you can use to pass your custom Cake arguments.
Read more >Bug? "More than one build script specified" when calling ...
When I specify a custom cake script with extra parameters using the build.ps1 bootstrap file, I get the following error:.
Read more >Cake runner for .NET Framework
Custom switches. All switches not recognized by Cake will be added to an argument list that is passed to the build script. See...
Read more >Simplifying the Cake global tool bootstrapper scripts with . ...
In this post I show how you can simplify your Cake global tool bootstrapper scripts by taking advantage of .NET Core 3.0 local...
Read more >Back for seconds: Practical Cake build automation tasks
Below is an example of how to call a Cake build script from a command (.cmd) file, setting an environment variable value and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ugh, I just found #1690 which suggests the syntax I need is
--target=Clean
, which works fine. Seems like the main problem here is the confusing error message and the (lack of) docs.I have seen this before, it seems to come from when the extra param value contains a ‘.’
> .\build.ps1 -Target "my-target" -Version="1.2.3"
this fails with the same output. from the notes i have on my fix, i looked at the cake source and see that the extra arguments will support ‘-’ or ‘–’ syntax.
i was able to change my use-case to the following to get it to work without modifying the build script or the underlying binary.
> .\build.ps1 -Target "my-target" --Version="1.2.3"
this is with 0.15.2