Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions src/pixi/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ export async function refreshPixi(projectPath: string): Promise<PixiEnvironment[

const qualifiedName = `${projectName}:${pixiEnv.name}`;
const sv = pythonPackage.version;
const shellArgs = ['shell', '--manifest-path', manifestPath, '-e', pixiEnv.name];

return {
name: `${qualifiedName} (${sv})`,
Expand All @@ -141,12 +142,10 @@ export async function refreshPixi(projectPath: string): Promise<PixiEnvironment[
executable: pixi,
args: ['run', '--manifest-path', manifestPath, '-e', pixiEnv.name, 'python'],
},
activation: [
{
executable: pixi,
args: ['shell', '--manifest-path', manifestPath, '-e', pixiEnv.name],
},
],
activation: [{ executable: pixi, args: shellArgs }],
// PowerShell treats a quoted path as a string, not a command, so it needs the
// call operator `&` (same approach as the built-in venv and conda managers).
shellActivation: new Map([['pwsh', [{ executable: '&', args: [pixi, ...shellArgs] }]]]),
deactivation: [{ executable: 'exit', args: [] }],
},
sysPrefix: pixiEnv.prefix,
Expand Down