SharpeRAD / Cake.Powershell

Powershell addin for Cake
http://cakebuild.net
MIT License
83 stars 36 forks source link

StartPowershellScript runs script twice? #15

Closed saasen closed 7 years ago

saasen commented 7 years ago

Hi.

We're experiencing an issue where our powershell scripts are running twice. This is happening when using both these signatures:

Are you having this issue also? Here's our cake task:

Task(Task2)
  .IsDependentOn(Task1)
  .Does(() => {
        Information("Starting Powershell script.");
        StartPowershellScript($"./test.ps1", args =>
        {
            args.Append("baseUrl", parameters.BaseUrl);
            args.Append("version", parameters.Version.SemVersion);
            args.Append("branch",  parameters.Branch);
        });
  });
saasen commented 7 years ago

UPDATE: I played around with the versions of this addin, and the first version it began running the script twice is v0.2.3.

saasen commented 7 years ago

@SharpeRAD?

SharpeRAD commented 7 years ago

Sorry but no, scripts and files are only executed once. I've updated the test files to highlight this point.

Run "./test/build.bat" for clarity.