Skip to content

Conversation

@bergmeister
Copy link
Contributor

@bergmeister bergmeister commented Apr 15, 2018

PR Summary

Fixes #6598 by using PR #6612 that adds a -WorkingDirectory parameter on pwsh.exe that this PR uses in order to make the explorer context menu also work when the path contains a single quote.
Technical note: " is an escape character for a double quote in WiX.
Note that this bug also occurs for the Windows PowerShell Explorer integration in Windows 10.

PR Checklist

@bergmeister bergmeister changed the title [Pending on PR 6616] Use new -WorkingDirectory parameter on pwsh.exe to be able to use context menu when path contains single quotes. [Pending on PR 6612] Use new -WorkingDirectory parameter on pwsh.exe to be able to use context menu when path contains single quotes. Apr 15, 2018
Copy link
Member

@SteveL-MSFT SteveL-MSFT left a comment

Choose a reason for hiding this comment

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

LGTM

@SteveL-MSFT SteveL-MSFT changed the title [Pending on PR 6612] Use new -WorkingDirectory parameter on pwsh.exe to be able to use context menu when path contains single quotes. WIP: [Pending on PR 6612] Use new -WorkingDirectory parameter on pwsh.exe to be able to use context menu when path contains single quotes. Apr 17, 2018
@SteveL-MSFT
Copy link
Member

Put WIP: in title until pending PR is merged

@daxian-dbw daxian-dbw self-assigned this Apr 23, 2018
@daxian-dbw daxian-dbw changed the title WIP: [Pending on PR 6612] Use new -WorkingDirectory parameter on pwsh.exe to be able to use context menu when path contains single quotes. Use new -WorkingDirectory parameter on pwsh.exe to be able to use context menu when path contains single quotes. Apr 23, 2018
@bergmeister
Copy link
Contributor Author

bergmeister commented Apr 23, 2018

I pulled in the required changes from master (that are merged now) and tested locally that it works using a folder that ends with a single quote. There was one sporadic test failure (it passed in my branch, which is now even with master) and the same test also failed after the PR 6612 of @SteveL-MSFT was merged into master. Unless we are aware of that, we should create an issue for each failure, even if it is sporadic and try to improve the test. From personal experience, sporadic failures can get quickly out of hand if they are not constantly being looked at and can cost a lot of time at the end over time even if they just start as a small nuisance.
image

@daxian-dbw
Copy link
Member

#6707 is opened to track the test failure in AppVeyor. I have restarted the build.

@bergmeister
Copy link
Contributor Author

Thanks

@daxian-dbw daxian-dbw merged commit fa33055 into PowerShell:master Apr 25, 2018
@munrobasher
Copy link

Can cross-reference this with https://superuser.com/questions/1323501/bug-in-powershell-classes-when-script-is-in-a-folder-containing-a-single-quote - is this the same issue here? My problem is with the class statement inside a script that resides in a folder containing a single quote character.

@bergmeister
Copy link
Contributor Author

bergmeister commented May 29, 2019

@munrobasher No, this issue/PR was about a different problem although it looks similar.
I repro-ed your linked issue in PowerShell 5.1 and can also confirm that the issue does not happen when using PowerShell 6.2.1
Windows PowerShell receives only critical and security fixes, I suggest to upgrade to PowerShell 6.2 or not use classes in this case then.

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.

File Explorer context-menu integration fails with directory names with embedded apostrophes (single quotes)

4 participants