Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Commit

Permalink
Ignore MSYS's Python // Resolve #439 Resolve #488
Browse files Browse the repository at this point in the history
  • Loading branch information
ivankravets committed Jun 3, 2017
1 parent fae0a10 commit bf51881
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/installer/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export async function getPythonExecutable(customDirs = null) {
}

for (const executable of candidates.values()) {
if (!executable.includes('msys') && (await isPython2(executable))) {
if (await isPython2(executable)) {
return executable;
}
}
Expand All @@ -156,7 +156,7 @@ export async function getPythonExecutable(customDirs = null) {
}

function isPython2(executable) {
const args = ['-c', 'import sys; print \'.\'.join(str(v) for v in sys.version_info[:2])'];
const args = ['-c', 'import sys; assert "msys" not in sys.executable.lower(); print ".".join(str(v) for v in sys.version_info[:2])'];
return new Promise(resolve => {
utils.runCommand(
executable,
Expand Down

0 comments on commit bf51881

Please sign in to comment.