Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrap nrfutil_path in quotes to avoid crash when the path includes spaces #54

Closed
wants to merge 2 commits into from

Conversation

EEScott
Copy link

@EEScott EEScott commented Aug 17, 2019

I was getting an error when trying to build on my machine where the user name has a space between and . The error I was getting is:

'C:\Users\Scott' is not recognized as an internal or external command, operable program or batch file.
*** [.pio\build\adafruit_feather_nrf52832\firmware.zip] Error 1

I only tested this for paths with a space and paths without a space.

@EEScott
Copy link
Author

EEScott commented Aug 17, 2019

Actually, if I'm being thorough, I didn't check that it works for the other os_platforms (only tested win32):

if os_platform == "win32":
    nrfutil_path = join(FRAMEWORK_DIR, "tools", "adafruit-nrfutil", os_platform, "adafruit-nrfutil.exe")
elif os_platform == "darwin":
    nrfutil_path = join(FRAMEWORK_DIR, "tools", "adafruit-nrfutil", "macos", "adafruit-nrfutil")
else:
    nrfutil_path = "adafruit-nrfutil"

… the username with a space issue affects upload too.
@EEScott
Copy link
Author

EEScott commented Aug 17, 2019

I updated the PR to move the quotes into the path assignment because I got the same error when trying to upload to the board. I'm guessing this would also be a problem for the os_platform == "darwin" case, but I don't know how to test that so I didn't make a change there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants