Skip to content

Fix check for vcvarsall.bat absence - #7218

Merged
Dongbo Wang (daxian-dbw) merged 1 commit into
PowerShell:masterfrom
PetSerAl:vcvarsall-check
Jul 2, 2018
Merged

Fix check for vcvarsall.bat absence#7218
Dongbo Wang (daxian-dbw) merged 1 commit into
PowerShell:masterfrom
PetSerAl:vcvarsall-check

Conversation

@PetSerAl

@PetSerAl PetSerAl commented Jul 1, 2018

Copy link
Copy Markdown
Contributor

PR Summary

If this line:

$vcvarsallbatPath = (Get-ChildItem $vcPath -Filter vcvarsall.bat -Recurse -File | Select-Object -First 1).FullName

does not find any candidates for vcvarsall.bat, then it ends assign $null to $vcvarsallbatPath. Passing $null for -Path parameter will cause check to fail due to parameter validation. This PR adds explicit check for $null to fix this.

PR Checklist

@iSazonov Ilya (iSazonov) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Leave a comment

@TravisEz13

Copy link
Copy Markdown
Member

Aditya Patwardhan (@adityapatwardhan) another change to port to the native repo.

@iSazonov

Copy link
Copy Markdown
Collaborator

I suggest cut off and do changes only in https://github.com/PowerShell/PowerShell-Native

@adityapatwardhan

Copy link
Copy Markdown
Member

I agree, I will update the README file under libpsl-native and powershell-native folder accordingly.

@adityapatwardhan

Copy link
Copy Markdown
Member

Opened a PR for the README updates. #7248

@PetSerAl
PetSerAl deleted the vcvarsall-check branch August 22, 2018 18:53
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants