Skip to content

Commit f21156c

Browse files
committed
fix(doctor): check for python3 instead of python
1 parent b11357d commit f21156c

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "nativescript",
33
"preferGlobal": true,
4-
"version": "8.5.0-dev.0",
4+
"version": "8.5.0-rc.0",
55
"author": "NativeScript <[email protected]>",
66
"description": "Command-line interface for building NativeScript projects",
77
"bin": {
@@ -57,7 +57,7 @@
5757
"mobile"
5858
],
5959
"dependencies": {
60-
"@nativescript/doctor": "2.0.9",
60+
"@nativescript/doctor": "2.0.10",
6161
"@nativescript/schematics-executor": "0.0.2",
6262
"@rigor789/resolve-package-path": "^1.0.5",
6363
"@rigor789/trapezedev-project": "^7.1.0",

packages/doctor/src/doctor.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ export class Doctor implements NativeScriptDoctor.IDoctor {
255255
infoMessage: "Python installed and configured correctly.",
256256
warningMessage: `Couldn't retrieve installed python packages.`,
257257
additionalInformation:
258-
"We cannot verify your python installation is setup correctly. Please, make sure you have both 'python' and 'pip' installed." +
258+
"We cannot verify your python installation is setup correctly. Please, make sure you have both 'python3' and 'pip3' installed." +
259259
EOL +
260260
`Error while validating Python packages. Error is: ${sysInfoData.pythonInfo.installationErrorMessage}`,
261261
platforms: [Constants.IOS_PLATFORM_NAME],

packages/doctor/src/sys-info.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ export class SysInfo implements NativeScriptDoctor.ISysInfo {
494494
async (): Promise<NativeScriptDoctor.IPythonInfo> => {
495495
if (this.hostInfo.isDarwin) {
496496
try {
497-
await this.childProcess.exec(`python -c "import six"`);
497+
await this.childProcess.exec(`python3 -c "import six"`);
498498
} catch (error) {
499499
// error.code = 1 so the Python is present, but we don't have six.
500500
if (error.code === 1) {

packages/doctor/test/sys-info.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ function createChildProcessResults(
113113
"tns --version": childProcessResult.nativeScriptCliVersion,
114114
emulator: { shouldThrowError: false },
115115
"which git": childProcessResult.git,
116-
'python -c "import six"': childProcessResult.pythonInfo,
116+
'python3 -c "import six"': childProcessResult.pythonInfo,
117117
};
118118
}
119119

@@ -608,7 +608,7 @@ Java HotSpot(TM) 64-Bit Server VM (build 25.202-b08, mixed mode)`),
608608
isInstalled: false,
609609
isSixPackageInstalled: false,
610610
installationErrorMessage:
611-
'This one throws error. (python -c "import six")',
611+
'This one throws error. (python3 -c "import six")',
612612
});
613613
});
614614
it("should return {isInstalled: true, isSixPackageInstalled: false} when python is installed but six package is not", async () => {

0 commit comments

Comments
 (0)