-
Notifications
You must be signed in to change notification settings - Fork 500
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
Allow means to avoid adding an absolute Cwd path to the workspace settings #4557
Comments
Agreed, it's been bothering me too. It seemed like an okay solution at first but the fact that it has to be absolute makes it very terrible. I think we could go with #3. I'm imagining the setting would be left available, but the extension would never write to it; instead, if prompted to choose X of Y workspace folders, we'll remember which by using Code's extension data API (it just wasn't wired up at the time). |
@andyleejordan I think this would be fairly simply possible that, rather than storing in workspace settings, store in the https://code.visualstudio.com/api/references/vscode-api#ExtensionContext This would persist across reloads, it would be user-specific (so different people can have different local CWD paths) and would function the same as CWD does now, though for good UX we will probably also want to expose what workspace is the currently active one in the Powershell language menu and offer a button to change it that ties to the existing command. |
From what I remember when originally implementing, using that was more difficult than anticipated as we hadn't plumped through the context at the time. However, I think we've since made the extension context more readily available to classes in the client, sooo yes this is probably doable pretty easily now! Up-for-grabs if you want to take a crack at it...I'm trying to figure out how not to have to just merge the revert PowerShell/PowerShell#20042 to fix #4668. |
So I looked back into saving that info, and it would go into |
@andyleejordan in testing #4687 this works as expected, do you plan to have the pop up dialog set the workspace folder setting as a sort of "dont ask again", or is it expected that the pop up dialog will always be per-session and you have to manually set the setting if that's what you want? If so then may want to make sure this gets noted as a behavior change in the release notes. |
@JustinGrote I knew I was forgetting something. I'm not sure how to best handle that at the moment...I'm just going to through a comment about that in the prompt itself. |
Prerequisites
Summary
Our team's repositories all track our
.code-workspace
files to make sure people are working with the same settings. However, we obviously can't include an absolute path in thepowershell.cwd
setting because we can't ensure it will be the same between users. Unfortunately, there seems to be no way to avoid this issue, and worst case, we keep having to remove the automatically appended setting.Proposed Design
I can think of 3 ways to circumvent this problem:
.gitignore
. You could enforce it to be located in the same directory as the workspace settings.The text was updated successfully, but these errors were encountered: