Using StartProcess returns "An error occurred when executing task 'taskName'.
Error: One or more errors occurred.
The system cannot find the file specified"
StartProcess("//ComputerName/SomeFolder/Some.exe")
This same error appears when using the Powershell addin that uses a script file that invokes Start-Process.
The process should be started. As it works outside of cake just using straight powershell.
26.1.0
64
Windows
Not yet, just local testing
Task("taskName")
.Description("start exe")
.Does(() =>
{
StartProcess(@"\\PCName\SomeFolder\Some.exe");
});
GIST LINK - Please create a gist and link to that gist here
OR
~sh
PLACE LOG CONTENT HERE
~

@jenaewhitmore Cake currently doesn't support UNC paths. Possible workarounds for this at this moment are i.e.
StartProcess("cmd", @"/c \\PCName\SomeFolder\Some.exe");I have a similar issue except I'm not using UNC paths.
The parameter I pass to StartProcess is like so:
var code = StartProcess("npm",
new ProcessSettings
{
Arguments = new ProcessArgumentBuilder()
.Append("run")
.Append("build-all-prod"),
});
Even though I'm able to get the process to work in powershell or in any other command line I'm unable to call it in the cake build.
When I use "git" as a parameter it works as a normal shell command would.
I was able to get this figured out - I just pushed the npm into the arguments appended. It was able to trigger off the step I was requesting.
Now the code looks like this for those interested:
var code = StartProcess("powershell",
new ProcessSettings
{
Arguments = new ProcessArgumentBuilder()
.Append("npm")
.Append("run")
.Append("build-all-prod"),
});
Most helpful comment
I was able to get this figured out - I just pushed the npm into the arguments appended. It was able to trigger off the step I was requesting.
Now the code looks like this for those interested: