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

EditorServices can't find PSScriptAnalyzerSettings.psd1 in relative path #2288

Closed
kborowinski opened this issue Nov 6, 2019 · 1 comment · Fixed by PowerShell/PowerShellEditorServices#1094
Labels

Comments

@kborowinski
Copy link

System Details

System Details Output

### VSCode version: 1.40.0-insider 515f496d9a7617caf07f38298f610920f60834d6 x64

### VSCode extensions:
alexcvzz.vscode-sqlite@0.8.0
christian-kohler.path-intellisense@1.4.2
CoenraadS.bracket-pair-colorizer-2@0.0.28
DavidAnson.vscode-markdownlint@0.31.2
DotJoshJohnson.xml@2.5.0
eamodio.gitlens@10.1.1
mechatroner.rainbow-csv@1.3.1
ms-python.python@2019.10.44104
ms-vscode.powershell-preview@2019.11.0
streetsidesoftware.code-spell-checker@1.7.18
vscode-icons-team.vscode-icons@9.5.0


### PSES version: 2.0.0.0

### PowerShell version:

Name                           Value
----                           -----
PSVersion                      7.0.0-preview.5
PSEdition                      Core
GitCommitId                    7.0.0-preview.5-49-gd58a82ad19fbfad81e85778c8b08cb1b28f58fce
OS                             Microsoft Windows 10.0.18362
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Issue Description

When relative path is specified to PSScriptAnalyzerSettings.psd1 the EditorServices cannot find the file. It works correctly with absolute paths though.

Relative path:
image

EditorServices.log:

2019-11-06 11:51:10.079 +01:00 [VRB] Using Script Analyzer settings path - 'D:\d%3A\Users\Bukem\Documents\PowerShell\PSScriptAnalyzerSettings.psd1'.
2019-11-06 11:51:16.056 +01:00 [ERR] Cannot find the path 'D:\d%3A\Users\Bukem\Documents\PowerShell\PSScriptAnalyzerSettings.psd1'.

Absolute path:
image

EditorServices.log:

2019-11-06 12:02:01.640 +01:00 [VRB] Using Script Analyzer settings path - 'D:\Users\Bukem\Documents\PowerShell\PSScriptAnalyzerSettings.psd1'.

It looks like the relative path is not properly decoded from the Uri format?

Expected Behaviour

EditorServices should be able to load PSScriptAnalyzerSettings.psd1 from relative path.

@ghost ghost added the Needs: Triage Maintainer attention needed! label Nov 6, 2019
@kborowinski kborowinski changed the title EditorServices can't find PSScriptAnalyzerSettings.psd1 from relative path EditorServices can't find PSScriptAnalyzerSettings.psd1 in relative path Nov 6, 2019
@rjmholt rjmholt added Area-Script Analysis Issue-Bug A bug to squash. and removed Needs: Triage Maintainer attention needed! labels Nov 6, 2019
@TylerLeonhardt
Copy link
Member

This is fixed in PowerShell/PowerShellEditorServices#1094

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

Successfully merging a pull request may close this issue.

3 participants