Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a1490e5

Browse files
Find shell integration script for VS Code 1.94+
It got moved.
1 parent efd6fd5 commit a1490e5

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

‎src/utils.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,17 @@
44
import os = require("os");
55
import path = require("path");
66
import vscode = require("vscode");
7+
import { satisfies } from "semver";
78

89
export const PowerShellLanguageId = "powershell";
910

10-
export const ShellIntegrationScript = path.join(vscode.env.appRoot, "out", "vs", "workbench", "contrib", "terminal", "browser", "media", "shellIntegration.ps1");
11+
// Path to the shell integration script in the VS Code installation
12+
// See https://github.com/microsoft/vscode/pull/227244
13+
const shellIntegrationMoved = satisfies(vscode.version, ">=1.94", { includePrerelease: true });
14+
export const ShellIntegrationScript = path.join(vscode.env.appRoot, "out", "vs", "workbench", "contrib", "terminal",
15+
shellIntegrationMoved ? "common" : "browser",
16+
shellIntegrationMoved ? "scripts" : "media",
17+
"shellIntegration.ps1");
1118

1219
export function escapeSingleQuotes(p: string): string {
1320
return p.replace(new RegExp("'", "g"), "''");

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /