-
Couldn't load subscription status.
- Fork 520
Pass the path to shellIntegration.ps1 directly to the server
#4959
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
Conversation
The server can't use `code --locate-shell-integration-path pwsh` because it doesn't know if it's `code` or `code-insiders` etc. Even when given the direct path to the client's host process, it can't reliably use that API either. Mostly this is due to Windows using `Code.cmd` in the background (which is not `Code.exe`, the host process) but it's also slower anyway as it requires another launch of Node.js. We'll have to rely on the path to the script not changing relative to `vscode.env.appRoot`, but at least that part is a public API.
5f20f63 to
7703924
Compare
shellIntegration.ps1 directly to the server (追記ここまで)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Tyriar I'm taking a hard dependency on this relative-to-app-root path. You all have too, but just internally as far as I can tell. Trust me, it was no good going down the road of passing process.argv0 and trying to use code --locate-blah-blah.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to know, chances of that path changing are very slim anyway
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Uh oh!
There was an error while loading. Please reload this page.
The server can't use
code --locate-shell-integration-path pwshbecause it doesn't know if it'scodeorcode-insidersetc. Even when given the direct path to the client's host process, it can't reliably use that API either. Mostly this is due to Windows usingCode.cmdin the background (which is notCode.exe, the host process) but it's also slower anyway as it requires another launch of Node.js.We'll have to rely on the path to the script not changing relative to
vscode.env.appRoot, but at least that part is a public API.Required by PowerShell/PowerShellEditorServices#2156.