Skip to content

scripts: fix macOS detection in retdec-utils.py - #1245

Open
takano32 wants to merge 1 commit into
avast:masterfrom
takano32:fix/utils-darwin-check
Open

takano32 wants to merge 1 commit into
avast:masterfrom
takano32:fix/utils-darwin-check

Conversation

@takano32

Copy link
Copy Markdown
Contributor

retdec-utils.py compares the imported platform module object to the string "darwin":

if platform == "darwin":

This is always False, so the gtime path is never selected on macOS and memory tracking there tries /usr/bin/time -v, which BSD time does not support. Compare sys.platform instead.

Verified on Linux that the module imports cleanly and still selects ['/usr/bin/time', '-v'].

🤖 Generated with Claude Code

https://claude.ai/code/session_014nNMVbAuffaPPQuYdLZgD1

The check compared the imported 'platform' module object to the
string "darwin", which is always False, so the gnu-time (gtime) path
was never selected on macOS and memory tracking there used
/usr/bin/time -v, which BSD time does not support. Compare
sys.platform instead.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014nNMVbAuffaPPQuYdLZgD1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant