From 3ffad5b81e961659e15410e56c8945b0843e59a2 Mon Sep 17 00:00:00 2001 From: ssimpson-ens Date: Wed, 28 Oct 2026 10:52:55 +0000 Subject: [PATCH 1/2] Set activation commands for TCSH (Same as CSH) --- src/managers/common/utils.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/managers/common/utils.ts b/src/managers/common/utils.ts index 6358bf54e..c17e2efc5 100644 --- a/src/managers/common/utils.ts +++ b/src/managers/common/utils.ts @@ -160,6 +160,9 @@ export async function getShellActivationCommands(binDir: string): Promise<{ if (await fs.pathExists(path.join(binDir, 'activate.csh'))) { shellActivation.set(ShellConstants.CSH, [{ executable: 'source', args: [path.join(binDir, `activate.csh`)] }]); shellDeactivation.set(ShellConstants.CSH, [{ executable: 'deactivate' }]); + + shellActivation.set(ShellConstants.TCSH, [{ executable: 'source', args: [path.join(binDir, `activate.csh`)] }]); + shellDeactivation.set(ShellConstants.TCSH, [{ executable: 'deactivate' }]); } if (await fs.pathExists(path.join(binDir, 'activate.fish'))) { From d70bb5339703baf207b6c90e7eea2a2998b7488e Mon Sep 17 00:00:00 2001 From: ssimpson-ens Date: Thu, 29 Oct 2026 17:40:32 +0000 Subject: [PATCH 2/2] Add regression test for CSH/TCSH activation --- .../common/utils.getShellActivationCommands.unit.test.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/test/managers/common/utils.getShellActivationCommands.unit.test.ts b/src/test/managers/common/utils.getShellActivationCommands.unit.test.ts index 33d7d0a21..2c1927c7a 100644 --- a/src/test/managers/common/utils.getShellActivationCommands.unit.test.ts +++ b/src/test/managers/common/utils.getShellActivationCommands.unit.test.ts @@ -190,6 +190,8 @@ suite('getShellActivationCommands', () => { ShellConstants.GITBASH, ShellConstants.ZSH, ShellConstants.KSH, + ShellConstants.CSH, + ShellConstants.TCSH, ]) { assert.strictEqual(result.shellActivation.get(shell), undefined, `${shell} should not be activated`); assert.strictEqual( @@ -213,6 +215,7 @@ suite('getShellActivationCommands', () => { test('POSIX shells are activated when the activate script exists', async () => { isWindowsStub.returns(false); await fs.writeFile(path.join(tmpDir, 'activate'), ''); + await fs.writeFile(path.join(tmpDir, 'activate.csh'), ''); const result = await getShellActivationCommands(tmpDir); @@ -221,6 +224,11 @@ suite('getShellActivationCommands', () => { { executable: 'source', args: [path.join(tmpDir, 'activate')] }, ]); } + for (const shell of [ShellConstants.CSH, ShellConstants.TCSH]) { + assert.deepStrictEqual(result.shellActivation.get(shell), [ + { executable: 'source', args: [path.join(tmpDir, 'activate.csh')] }, + ]); + } }); }); });