-
Notifications
You must be signed in to change notification settings - Fork 61
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
[nrf noup] Fix zap instalation for MacOs #405
Conversation
scripts/setup/nrfconnect/get_zap.py
Outdated
@@ -198,4 +204,5 @@ def main(): | |||
|
|||
|
|||
if __name__ == '__main__': | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit but why are blank lines added in if
or a method block but only sometimes. Let's be consistent :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My oversight, I've been developing those changes on the Mac, and I made a PR Linux a lot of blank lines were added by mistake.
scripts/setup/nrfconnect/get_zap.py
Outdated
zip.extractall(os.path.join(location, package_name)) | ||
zip.close() | ||
if (platform.system() == 'Darwin'): | ||
subprocess.run(['unzip', package, '-d', destination], stdout = subprocess.PIPE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use subprocess.check_call
or error handling? Note that using subprocess.PIPE
without consuming the output is dangerous as it may block the child process if PIPE buffer is filled. Btw, what was the issue with ZipFile
? Should we add a comment for the future reference?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usage of any python library for zip files on the MacOs fails at the unziping Alias files process, i mean it just unzip it as a .txt files. Thi is the reason I change it for the shell command.
About subprocess.check_call, good point, I will add this.
9a0eeb2
to
eb3e777
Compare
eb3e777
to
931a956
Compare
Fix updating get_zap.py script, which ensure zap will work on the MacOs systems. Signed-off-by: Patryk Lipinski <patryk.lipinski@nordicsemi.no>
931a956
to
92e8dd3
Compare
Fix updating get_zap.py script, which ensure zap will work on the MacOs systems.