Skip to content

Commit c223620

Browse files
authored
Merge pull request #2751 from NativeScript/vladimirov/merge-rel-master
Vladimirov/merge rel master - we know
2 parents 261429d + 7c83bca commit c223620

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

lib/node-package-manager.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export class NodePackageManager implements INodePackageManager {
7777
throw err;
7878
}
7979
}
80-
}
80+
}
8181

8282
@exported("npm")
8383
public async uninstall(packageName: string, config?: any, path?: string): Promise<string> {

lib/services/doctor-service.ts

+8-7
Original file line numberDiff line numberDiff line change
@@ -226,17 +226,18 @@ class DoctorService implements IDoctorService {
226226
let hasInvalidPackages = false;
227227
if (this.$hostInfo.isDarwin) {
228228
try {
229-
let queryForSixPackage = await this.$childProcess.exec(`pip freeze | grep '^six=' | wc -l`);
230-
let sixPackagesFoundCount = parseInt(queryForSixPackage);
231-
if (sixPackagesFoundCount === 0) {
229+
await this.$childProcess.exec(`python -c "import six"`);
230+
} catch (error) {
231+
// error.code = 1 so the Python is present, but we don't have six.
232+
if (error.code === 1) {
232233
hasInvalidPackages = true;
233234
this.$logger.warn("The Python 'six' package not found.");
234235
this.$logger.out("This package is required by the Debugger library (LLDB) for iOS. You can install it by running 'pip install six' from the terminal.");
236+
} else {
237+
this.$logger.warn("Couldn't retrieve installed python packages.");
238+
this.$logger.out("We cannot verify your python installation is setup correctly. Please, make sure you have both 'python' and 'pip' installed.");
239+
this.$logger.trace(`Error while validating Python packages. Error is: ${error.message}`);
235240
}
236-
} catch (error) {
237-
this.$logger.warn("Couldn't retrieve installed python packages.");
238-
this.$logger.out("We cannot verify your python installation is setup correctly. Please, make sure you have both 'python' and 'pip' installed.");
239-
this.$logger.trace(`Error while validating Python packages. Error is: ${error.message}`);
240241
}
241242
}
242243
return hasInvalidPackages;

0 commit comments

Comments
 (0)