Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

fixed version check #36

Merged
merged 1 commit into from
Feb 15, 2019
Merged

fixed version check #36

merged 1 commit into from
Feb 15, 2019

Conversation

miketheitguy
Copy link
Contributor

@miketheitguy miketheitguy commented Feb 15, 2019

Whenever you use Invoke-OperationValidation, you receive an error that it cannot compare an int to the System.Management.Automation.SemanticVersion type.

In addition, due to this version check failure, the call to Import-PowerShellDataFile never succeeds.

Description

Since the code is only checking the major version in the check (in this case, 5) -- I simply pull $PSVersionTable.PSVersion.Major, which itself is an int32, which resolves this error.

Related Issue

Motivation and Context

I like my stuff to work :)

How Has This Been Tested?

I have not tested this change, but I assume this is undesirable behavior and it's a relatively simple fix.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

This change is Reviewable

@devblackops
Copy link
Contributor

Thanks for fixing this @miketheitguy!

@devblackops devblackops merged commit 9fd0e83 into PowerShell:master Feb 15, 2019
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