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

Install throws an exception #448

Closed
andrewducker opened this issue Mar 1, 2017 · 4 comments
Closed

Install throws an exception #448

andrewducker opened this issue Mar 1, 2017 · 4 comments
Assignees
Milestone

Comments

@andrewducker
Copy link

System Details

  • posh-git version/path: 0.7.1.0 pre0 C:\zzzz\posh-git-master\src
  • PowerShell version: 4
  • Git version: 2.8.1.windows.1
  • Operating system name and version: 6.1.7601.65536

Issue Description

I am experiencing a problem with...
The install.ps1 file throws an exception:

Unable to find type [System.Management.Automation.SignatureType]. Make sure that the assembly that contains this type is loaded.
At C:\zzzz\posh-git-master\src\Utils.ps1:164 char:13
+         if ($sig.SignatureType -eq [System.Management.Automation.SignatureType]: ...
@dahlbyk
Copy link
Owner

dahlbyk commented Mar 1, 2017

Fascinating... What does this give you?

Get-AuthenticodeSignature $PROFILE | Format-List

@rkeithhill
Copy link
Collaborator

Doh! That's my bug. I had checked for SignatureStatus on v2 but not SignatureType. Apparently that is is new in PS v5. I'll submit a PR for this later tonight.

@rkeithhill rkeithhill self-assigned this Mar 1, 2017
@rkeithhill rkeithhill added this to the v0.7.1 milestone Mar 1, 2017
rkeithhill added a commit that referenced this issue Mar 2, 2017
We now rely on the SignerCertificate field to be $null.  If it isn't $null, then we assume the profile is signed and we don't modify it.  Note that this field is not $null when the file is signed but there is a hash mismatch (whic is the desired behavior).
rkeithhill added a commit that referenced this issue Mar 2, 2017
We now rely on the SignerCertificate field to be $null.  If it isn't $null, then we assume the profile is signed and we don't modify it.  Note that this field is not $null when the file is signed but there is a hash mismatch (which is the desired behavior). Fix #448.
rkeithhill added a commit that referenced this issue Mar 2, 2017
…ot-on-v2

Fix #448 SignatureType enum not available on PS v2
@rkeithhill
Copy link
Collaborator

@andrewducker When you get a chance, can you verify the fix? Thanks.

@andrewducker
Copy link
Author

Yup, worked fine. Thanks!

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

No branches or pull requests

3 participants