-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Add missing node os.release() implementation #4065
Conversation
efce9fd
to
efc9454
Compare
This comment has been minimized.
This comment has been minimized.
cli/ops/os.rs
Outdated
_zero_copy: Option<ZeroCopyBuf>, | ||
) -> Result<JsonOp, ErrBox> { | ||
state.check_env()?; | ||
let release = sys_info::os_release().unwrap_or_else(|_| "".to_owned()); |
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.
With Node.js, os.release()
on Windows returns "<major>.<minor>.<build>"
whereas sys_info::os_release()
returns just "<major>.<minor>"
.
I could PR a change to sys_info adding the build number but we seem to have pinned it to an older version because of Windows breakage in the latest version...
edit: I went ahead and did it anyway: FillZpp/sys-info-rs#47
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.
nice, thank you.
55c9d73
to
4d6ce6a
Compare
i rebased to fix merge conflicts. |
using to_string instead of to_owned (is there a rule of thumb in deno for witch the team prefer to use ?) |
1c9dae4
to
77afe3f
Compare
77afe3f
to
941c167
Compare
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.
LGTM
PR for one of the tasks from issue #3802 . Adding platform support as it's now there on process impl .
ps: planning to make more of thoses as i learn deno a little more before starting more serious contributions.