Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest version detection not always working #67

Closed
jayvdb opened this issue Jun 24, 2019 · 5 comments · Fixed by #69
Closed

Latest version detection not always working #67

jayvdb opened this issue Jun 24, 2019 · 5 comments · Fixed by #69

Comments

@jayvdb
Copy link
Contributor

jayvdb commented Jun 24, 2019

When using develop branch, I am seeing a problem with the code added in #55

The variable '$latest' cannot be retrieved because it has not been set.

See https://ci.appveyor.com/project/jayvdb/mobans/builds/25484849/job/fgbips38471hguug

And latest https://gitlab.com/coala/mobans/merge_requests/130

@Badgerati
Copy link
Owner

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.

@Badgerati
Copy link
Owner

Badgerati commented Jun 24, 2019

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).

@jayvdb
Copy link
Contributor Author

jayvdb commented Jun 24, 2019

ok, I'll see if I can disable and re-enable it around Fudge invocation.

@jayvdb
Copy link
Contributor Author

jayvdb commented Jun 24, 2019

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)

@Badgerati
Copy link
Owner

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.

Badgerati added a commit that referenced this issue Jun 24, 2019
@jayvdb jayvdb mentioned this issue Jun 26, 2019
Badgerati added a commit that referenced this issue Jun 26, 2019
jayvdb pushed a commit to jayvdb/Fudge that referenced this issue Jun 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants