Skip to content

Commit 0966979

Browse files
committed
Adapt to shell startup in core
1 parent f78c997 commit 0966979

6 files changed

Lines changed: 17 additions & 6 deletions

File tree

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"publisher": "ms-python",
77
"preview": true,
88
"engines": {
9-
"vscode": "^1.100.0-20250407"
9+
"vscode": "^1.103.0"
1010
},
1111
"categories": [
1212
"Other"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
export const BASH_ENV_KEY = 'VSCODE_BASH_ACTIVATE';
2-
export const ZSH_ENV_KEY = 'VSCODE_ZSH_ACTIVATE';
1+
export const BASH_ENV_KEY = 'VSCODE_PYTHON_BASH_ACTIVATE';
2+
export const ZSH_ENV_KEY = 'VSCODE_PYTHON_ZSH_ACTIVATE';
33
export const BASH_SCRIPT_VERSION = '0.1.1';

src/features/terminal/shells/bash/bashStartup.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,17 @@ async function setupStartup(profile: string, key: string, name: string): Promise
7272
const activationContent = getActivationContent(key);
7373

7474
try {
75+
// Question #1: Ask about the guard, if that is needed in core.
76+
// NEED THE GUARD IN CORE.
77+
78+
// Question #2: I want to check if shell integration script had proper value for VSCODE_BASH_ACTIVATE, and has evaluated that before doing all below?
79+
80+
// VSCODE_PYTHON_ACTIVATE;
81+
82+
// Because if it did, we dont have to bother `insertStartupCode` in user's profile files.
83+
// - We would know shell integration script has proper value of ACTIVATE via checking if that var is non-empty
84+
// - We would know if that has been evaluated if shell integration --> (shell integration script would have ran and evaled, if not we show error)
85+
7586
if (await fs.pathExists(profile)) {
7687
const content = await fs.readFile(profile, 'utf8');
7788
if (hasStartupCode(content, regionStart, regionEnd, [key])) {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
export const CMD_ENV_KEY = 'VSCODE_CMD_ACTIVATE';
1+
export const CMD_ENV_KEY = 'VSCODE_PYTHON_CMD_ACTIVATE';
22
export const CMD_SCRIPT_VERSION = '0.1.0';
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
export const POWERSHELL_ENV_KEY = 'VSCODE_PWSH_ACTIVATE';
1+
export const POWERSHELL_ENV_KEY = 'VSCODE_PYTHON_PWSH_ACTIVATE';
22
export const PWSH_SCRIPT_VERSION = '0.1.1';

0 commit comments

Comments
 (0)