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

(GH-143) Ensure checksum is used#144

Open
gep13 wants to merge 1 commit into
chocolatey-archive:masterfrom
gep13:Issue-143
Open

(GH-143) Ensure checksum is used#144
gep13 wants to merge 1 commit into
chocolatey-archive:masterfrom
gep13:Issue-143

Conversation

@gep13

@gep13 gep13 commented Aug 7, 2016

Copy link
Copy Markdown
Member

@ferventcoder thoughts?

<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
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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

@gep13

gep13 commented Aug 8, 2016

Copy link
Copy Markdown
Member Author

@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
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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