Skip to content
This repository has been archived by the owner on Oct 11, 2021. It is now read-only.

(GH-143) Ensure checksum is used #144

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gep13
Copy link
Member

@gep13 gep13 commented Aug 7, 2016

@ferventcoder thoughts?

@@ -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">
Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ferventcoder will do.

Copy link
Member Author

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?

Copy link
Member

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.

@ferventcoder
Copy link
Member

It's a good start - now test with package splatting @packageArgs.

@gep13
Copy link
Member Author

gep13 commented Aug 8, 2016

@ferventcoder said...
It's a good start - now test with package splatting @packageArgs.

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");
Copy link
Member

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ping

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants