Put quotes around pip executable to allow for spaces in paths
ClosedPublic

Authored by russellg on Sep 27 2017, 4:30 AM.

Details

Summary

When python is installed in a location with spaces (ie, Program Files), this command fails with the error:

executing command: C:\Program Files\Python36\Scripts\pip.EXE install --upgrade  pyyaml
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.

This change fixes that.

Test Plan

Tested it locally, and it works.

Please tell if more is expected.

Diff Detail

Repository
R138 Craft
Lint
Lint Skipped
Unit
Unit Tests Skipped
russellg created this revision.Sep 27 2017, 4:30 AM
kfunk requested changes to this revision.Sep 27 2017, 7:28 AM
kfunk added a subscriber: kfunk.

Can you try passing the command as a list?

utils.system accepts lists these days.

This revision now requires changes to proceed.Sep 27 2017, 7:28 AM
russellg updated this revision to Diff 20168.Sep 30 2017, 9:20 PM

Okay, now it uses an array, and I converted args to an array because that's more logical.

kfunk added a comment.Oct 1 2017, 9:38 PM

Note: f"{someVar}" == someVar -- I'll fix and then push the patch. Thanks!

kfunk accepted this revision.Oct 1 2017, 9:38 PM
This revision is now accepted and ready to land.Oct 1 2017, 9:38 PM
This revision was automatically updated to reflect the committed changes.