Skip to content

Commit

Permalink
Move to python command calls
Browse files Browse the repository at this point in the history
  • Loading branch information
pythongosssss committed Dec 4, 2024
1 parent 4f35101 commit 8c95e49
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions src/virtualEnvironment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,14 @@ export class VirtualEnvironment {
? path.join(this.venvPath, 'Scripts', 'python.exe')
: path.join(this.venvPath, 'bin', 'python');

return this.runCommand(pythonInterpreterPath, args, {}, callbacks);
return this.runCommand(
pythonInterpreterPath,
args,
{
PYTHONIOENCODING: 'utf-8',
},
callbacks
);
}

/**
Expand All @@ -187,7 +194,14 @@ export class VirtualEnvironment {
args: string[],
callbacks?: ProcessCallbacks
): Promise<{ exitCode: number | null }> {
return this.runCommandAsync(this.pythonInterpreterPath, args, {}, callbacks);
return this.runCommandAsync(
this.pythonInterpreterPath,
args,
{
PYTHONIOENCODING: 'utf-8',
},
callbacks
);
}

/**
Expand Down Expand Up @@ -252,7 +266,6 @@ export class VirtualEnvironment {
env: {
...process.env,
...env,
PYTHONIOENCODING: 'utf-8',
},
});

Expand Down

0 comments on commit 8c95e49

Please sign in to comment.