Skip to content

Commit

Permalink
Replace user of source command with (#5818)
Browse files Browse the repository at this point in the history
Per https://stackoverflow.com/questions/13702425/source-command-not-found-in-sh-shell, `.` is more widely supportedthan `source`. For example, `bin/sh` packaged in Ubuntu does not have `source` but supports `.`.

Credits for @RafaelZasas to discovering the issue on Ubuntu.

Fixes #5636
  • Loading branch information
taeold committed May 9, 2023
1 parent 6e73140 commit cf799e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/functions/python.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export function virtualEnvCmd(cwd: string, venvDir: string): { command: string;
process.platform === "win32" ? ["Scripts", "activate.bat"] : ["bin", "activate"];
const venvActivate = path.join(cwd, venvDir, ...activateScriptPath);
return {
command: process.platform === "win32" ? venvActivate : "source",
command: process.platform === "win32" ? venvActivate : ".",
args: [process.platform === "win32" ? "" : venvActivate],
};
}
Expand Down

0 comments on commit cf799e9

Please sign in to comment.