SharpeRAD / Cake.Powershell

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

args.AppendSecret fails if the secret contains white space #43

Closed colinangusmackay closed 6 years ago

colinangusmackay commented 6 years ago

The following fails:

        StartPowershellScript(script, new PowershellSettings()
            .WithModule(_module)
            .WithArguments(args=>
            {
                // other arguments here
                args.AppendSecret("TaskPassword", taskPassword);
            }));

The following works, but exposes the secret:

        StartPowershellScript(script, new PowershellSettings()
            .WithModule(_module)
            .WithArguments(args=>
            {
                // other arguments here
                args.AppendQuoted("TaskPassword", taskPassword);
            }));

It appears that it might be because the secret contains space characters.

SharpeRAD commented 6 years ago

Sorry only just noticed this, use AppendQuotedSecret instead.