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

[nrf noup] Fix zap instalation for MacOs #405

Merged
merged 1 commit into from
Mar 8, 2024

Conversation

LipinskiPNordicSemi
Copy link
Contributor

Fix updating get_zap.py script, which ensure zap will work on the MacOs systems.

@@ -198,4 +204,5 @@ def main():


if __name__ == '__main__':

Copy link
Contributor

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 :)

Copy link
Contributor Author

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.

zip.extractall(os.path.join(location, package_name))
zip.close()
if (platform.system() == 'Darwin'):
subprocess.run(['unzip', package, '-d', destination], stdout = subprocess.PIPE)
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Fix updating get_zap.py script, which ensure zap
will work on the MacOs systems.

Signed-off-by: Patryk Lipinski <patryk.lipinski@nordicsemi.no>
@LuDuda LuDuda merged commit 33ec94f into nrfconnect:master Mar 8, 2024
3 of 7 checks passed
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.

4 participants