mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-31 20:55:34 +01:00
Support --locate-shell-integration-path in server CLI (#155870)
* Fix shell-integration remote cli * Don't silently fail based on TERM_PROGRAM We want this to work even in terminals where TERM_PROGRAM may not exist, such as in a regular ssh session. The manual install recommends using an if before sourcing anyway. * Handle shell integration option on server cli * Move shell integration option handling higher
This commit is contained in:
@@ -63,10 +63,6 @@ export async function main(argv: string[]): Promise<any> {
|
||||
|
||||
// Shell integration
|
||||
else if (args['locate-shell-integration-path']) {
|
||||
// Silently fail when the terminal is not VS Code's integrated terminal
|
||||
if (process.env['TERM_PROGRAM'] !== 'vscode') {
|
||||
return;
|
||||
}
|
||||
let file: string;
|
||||
switch (args['locate-shell-integration-path']) {
|
||||
// Usage: `[[ "$TERM_PROGRAM" == "vscode" ]] && . "$(code --locate-shell-integration-path bash)"`
|
||||
|
||||
Reference in New Issue
Block a user