-
Notifications
You must be signed in to change notification settings - Fork 594
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
fix: remove hostname from uname output in OS detection #1440
Conversation
awk is frowned upon. I would probably suggest |
@HirschBerge is exactly right. We have a no awk policy over here |
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.
See my suggestions for how to get rid of the awk dependency.
Your change itself is well reasoned and a good contribution
Thanks for the suggestion i will remove awk and will update the pull request |
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.
thx for the contrib 👑
Happy to be helpful and thanks for the understanding |
fix: remove hostname from uname output in OS detection
Type of change
Description
Using $(uname -a | awk '{$2=""; print $0}') instead of just uname -a helps remove the hostname from the output. since hostname can vary between systems it may lead to incorrect OS detection. By stripping out the hostname case statement accurately matches the relevant OS identifiers.
In my system script not work properly because my hostname is "vaishakh" , because it contains "ish" the case identify my linux device as ios device and ani-cli failed to play the video.
Checklist
-c
history and continue work-d
downloads work-s
syncplay works-q
quality works-v
vlc works-e
select episode works-S
select index works-r
range selection works--skip
ani-skip works--skip-title
ani-skip title argument works--no-detach
no detach works--dub
and regular (sub) mode both work-h
help info is up to dateAdditional Testcases