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

Change Process::Status#to_s to hex format on Windows #15285

Conversation

straight-shoota
Copy link
Member

@straight-shoota straight-shoota commented Dec 18, 2024

Status numbers on Windows are usually represented in hexadecimal notation. This applies that for all large exit status values (above UInt16::MAX, inspired from https://cs.opensource.google/go/go/+/refs/tags/go1.23.4:src/os/exec_posix.go;l=117-121).

This again improves usability because it's easier to interpret unknown status values and compare them with listings sharing the typical number format.

In #15283 we already changed Status#to_s to print the name of known values. But not all status codes are named.

Follow-up on #15267

@straight-shoota straight-shoota force-pushed the feat/process-status-stringify-windows branch from 22a0d62 to 40501f0 Compare December 18, 2024 10:51
@straight-shoota straight-shoota added this to the 1.15.0 milestone Dec 18, 2024
@straight-shoota straight-shoota merged commit 22fb31b into crystal-lang:master Dec 20, 2024
69 checks passed
@straight-shoota straight-shoota deleted the feat/process-status-stringify-windows branch December 20, 2024 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants