SharpeRAD / Cake.Powershell

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

Issue with Context on Linux #91

Open agnija-bako opened 2 years ago

agnija-bako commented 2 years ago

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?