Skip to content
This repository has been archived by the owner on Sep 30, 2022. It is now read-only.

Commit

Permalink
fix: use python3 iso python environment
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinDeJong-TomTom committed May 16, 2022
1 parent a57b46a commit 9f021da
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions dist/commisery/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10026,7 +10026,7 @@ function get_error_subjects(message) {
function check_prerequisites() {
return __awaiter(this, void 0, void 0, function* () {
const python_version_re = /Python\s*(\d+)\.(\d+)\.(\d+)/;
const { stdout: python_version } = yield exec.getExecOutput("python", ["--version"], { silent: true });
const { stdout: python_version } = yield exec.getExecOutput("python3", ["--version"], { silent: true });
const match = python_version_re.exec(python_version);
if (!match || match.length != 4) {
throw new Error("Unable to determine the installed Python version.");
Expand All @@ -10035,7 +10035,7 @@ function check_prerequisites() {
throw new Error(`Incorrect Python version installed; found ${match[1]}.${match[2]}.${match[3]}, expected >= 3.8.0`);
}
try {
const { stdout: pip_version } = yield exec.getExecOutput("python", ["-m", "pip", "--version"], { silent: true });
const { stdout: pip_version } = yield exec.getExecOutput("python3", ["-m", "pip", "--version"], { silent: true });
}
catch (_a) {
throw new Error("Unable to determine the installed Pip version.");
Expand All @@ -10050,7 +10050,7 @@ function prepare_environment() {
// Ensure Python (>= 3.8) and pip are installed
yield check_prerequisites();
// Install latest version of commisery
yield exec.exec("python", ["-m", "pip", "install", "--upgrade", "commisery"]);
yield exec.exec("python3", ["-m", "pip", "install", "--upgrade", "commisery"]);
});
}
/**
Expand Down
6 changes: 3 additions & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
async function check_prerequisites() {
const python_version_re = /Python\s*(\d+)\.(\d+)\.(\d+)/;
const { stdout: python_version } = await exec.getExecOutput(
"python",
"python3",
["--version"],
{ silent: true }
);
Expand All @@ -76,7 +76,7 @@

try {
const { stdout: pip_version } = await exec.getExecOutput(
"python",
"python3",
["-m", "pip", "--version"],
{ silent: true }
);
Expand All @@ -93,7 +93,7 @@
await check_prerequisites();

// Install latest version of commisery
await exec.exec("python", ["-m", "pip", "install", "--upgrade", "commisery"]);
await exec.exec("python3", ["-m", "pip", "install", "--upgrade", "commisery"]);
}

/**
Expand Down

0 comments on commit 9f021da

Please sign in to comment.