File tree 2 files changed +8
-9
lines changed
2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ export class NodePackageManager implements INodePackageManager {
77
77
throw err ;
78
78
}
79
79
}
80
- }
80
+ }
81
81
82
82
@exported ( "npm" )
83
83
public async uninstall ( packageName : string , config ?: any , path ?: string ) : Promise < string > {
Original file line number Diff line number Diff line change @@ -226,18 +226,17 @@ class DoctorService implements IDoctorService {
226
226
let hasInvalidPackages = false ;
227
227
if ( this . $hostInfo . isDarwin ) {
228
228
try {
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 ) {
229
+ let queryForSixPackage = await this . $childProcess . exec ( `pip freeze | grep '^six=' | wc -l` ) ;
230
+ let sixPackagesFoundCount = parseInt ( queryForSixPackage ) ;
231
+ if ( sixPackagesFoundCount === 0 ) {
233
232
hasInvalidPackages = true ;
234
233
this . $logger . warn ( "The Python 'six' package not found." ) ;
235
234
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 } ` ) ;
240
235
}
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 } ` ) ;
241
240
}
242
241
}
243
242
return hasInvalidPackages ;
You can’t perform that action at this time.
0 commit comments