X Tutup
The Wayback Machine - https://web.archive.org/web/20200918094727/https://github.com/PowerShell/PSScriptAnalyzer/pull/1176
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

Change Compatibility rule logic for finding the module base #1176

Merged
merged 1 commit into from Mar 15, 2019

Conversation

@JamesWTruher
Copy link
Member

JamesWTruher commented Mar 14, 2019

PR Summary

Now hunt for the PSScriptAnalyzer.psd1 file.
This is because we might be installed in a versioned directory, rather than the directory name PSScriptAnalyzer, we might be in PSScriptAnalyzer/1.18.0

PR Checklist

… file

This is because we might be installed in a versioned directory, rather than
the a directory name PSScriptAnalyzer, we'll be in PSScriptAnalyzer/1.18.0
@JamesWTruher JamesWTruher requested review from rjmholt and bergmeister Mar 14, 2019
Copy link
Member

rjmholt left a comment

Good catch

Copy link
Collaborator

bergmeister left a comment

There's a lot of hard-coding. For a quick-fix before the release it's fine but we should create an item to move the binaries of v5 into it's own folder so that we do not need to have such a logic. Also: we should improve our test setup to deploy PSSA in a named folder

psmPath = Path.Combine(nonNormalizedRoot, psdFile);
if ( ! File.Exists(psmPath) ) {
// Couldn't find it, give up
return String.Empty;

This comment has been minimized.

@bergmeister

bergmeister Mar 15, 2019 Collaborator

Should we not rather throw? If a user accidentally deletes/moves/rename the file in the installation folder, then we'd have an actionable error message

@bergmeister bergmeister added this to the 1.18 milestone Mar 15, 2019
@JamesWTruher JamesWTruher merged commit aaa24d9 into PowerShell:development Mar 15, 2019
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
license/cla All CLA requirements met.
Details
bergmeister added a commit to bergmeister/PSScriptAnalyzer that referenced this pull request Mar 22, 2019
… file (PowerShell#1176)

This is because we might be installed in a versioned directory, rather than
the a directory name PSScriptAnalyzer, we'll be in PSScriptAnalyzer/1.18.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.
X Tutup