Cake.Powershell icon indicating copy to clipboard operation
Cake.Powershell copied to clipboard

Issue with Context on Linux

Open agnija-bako opened this issue 3 years ago • 0 comments

I am running a StartPowershellFile on Cake

Task("Deploy")    
    .IsDependentOn("Publish")
    .Description("Deploy new function")
    .Does(() =>
{   
    DoInDirectory(publishScriptsPath, () =>
    {
        StartPowershellFile(upsertApim, args =>
        {
            args.Append("param1", param1);
            args.Append("param2", param2);
            args.Append("param3",param3);
        });
    });
});

RunTarget(target);`

This runs on a linux machine that is a self hosted Github runner. Everytime I run this Cake task I get a NullReferenceException, and it points me to the follow line in the Cake.Powershell code

image

It seems that maybe the ICakeContext is either null or one of its properties is null and is causing the issue?

agnija-bako avatar Mar 09 '22 15:03 agnija-bako