Closed jayvdb closed 5 years ago
Ah, it'll be because you're setting Set-StrictMode -Version Latest
in the scripts.
I'll get that set in Fudge and fix any other issues; but removing that as a temporarily solution should work.
I just quickly tried having Strict enabled, and I don't think it's feasible. I had a Fudgefile with no source
defined, and it failed immediately because the JSON didn't have that property. This also happens in other areas as well, such as detecting if pre/post scripts are supplied. (If you have no script block, it errors).
ok, I'll see if I can disable and re-enable it around Fudge invocation.
But worth noting that im only seeing it in develop, and with the recently add $latest
enhancement, probably because I am only directly using Invoke-Chocolatey
(and Get-Fudgefile.. too)
It is strange how it's flagging on the $latest
variable with strict set, but not with everything else that should be throwing 🤔 .
I've ran it quite a few times, but the only time I get the error is when strict is enabled; and failures just before that for source
in the Fudgefile.
If having strict on for you is working at the moment, except for $latest
, and you need strict; I can put the fix in, as it's only a line.
When using develop branch, I am seeing a problem with the code added in https://github.com/Badgerati/Fudge/pull/55
See https://ci.appveyor.com/project/jayvdb/mobans/builds/25484849/job/fgbips38471hguug
And latest https://gitlab.com/coala/mobans/merge_requests/130