-
Notifications
You must be signed in to change notification settings - Fork 29
(GH-143) Ensure checksum is used #144
base: master
Are you sure you want to change the base?
Conversation
@@ -83,6 +83,10 @@ | |||
<Reference Include="System.ComponentModel.DataAnnotations" /> | |||
<Reference Include="System.Configuration" /> | |||
<Reference Include="System.Core" /> | |||
<Reference Include="System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove v3 here. You will need to manually edit this file. Look at how Choco does it and follow suit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ferventcoder will do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ferventcoder out of curiousity, what is the reason for doing this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typically it allows any version of SMA to work. So if the system is on v2 or v5, it will still bind.
It's a good start - now test with package splatting |
Will do 👍 |
if (methodsThatRequireChecksums.Any()) | ||
{ | ||
// find all variables and parameters, and check to see if any of them are named checksum | ||
var variables = tokens.Where(p => p.Type == PSTokenType.Variable && p.Content.to_lower() == "checksum"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now define a test where I set the variable checksum
, but I don't pass it to the function. And one where I define an empty value and pass it to the function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ping
@ferventcoder thoughts?