rmyorston / busybox-w32

WIN32 native port of BusyBox.
https://frippery.org/busybox
Other
670 stars 124 forks source link

When called as `/bin/uname` in ash, uname always prints machine type (arch) regardless of the option passed #392

Closed shunf4 closed 5 months ago

shunf4 commented 5 months ago
C:\Users\shunf4\Downloads>.\busybox-w64u-PRE-5311-g1eee84b80.exe | .\busybox-w64u-PRE-5311-g1eee84b80.exe head
BusyBox v1.37.0-PRE-5311-g1eee84b80 (2024-03-15 09:53:54 GMT)
(mingw64-gcc 13.2.1-5.fc39; mingw64-crt 11.0.0-2.fc39; glob; Unicode)

BusyBox is copyrighted by many authors between 1998-2024.
Licensed under GPLv2. See source distribution for detailed
copyright notices.

Usage: busybox [function [arguments]...]
   or: busybox --list[-full]
   or: busybox --install [-s] [-u|DIR]

C:\Users\shunf4\Downloads>.\busybox-w64u-PRE-5311-g1eee84b80.exe uname
Windows_NT

C:\Users\shunf4\Downloads>.\busybox-w64u-PRE-5311-g1eee84b80.exe /bin/uname
Windows_NT

C:\Users\shunf4\Downloads>.\busybox-w64u-PRE-5311-g1eee84b80.exe sh
~/Downloads $ uname
Windows_NT
~/Downloads $ /bin/uname # Expected: Windows_NT
x86_64
~/Downloads $ /bin/uname -s # Expected: Windows_NT
x86_64
~/Downloads $ /bin/uname -o # Expected: MS/Windows
x86_64
~/Downloads $ /bin/uname -a # Expected: Windows_NT XXXX 10.0 XXXXX x86_64 MS/Windows
x86_64
~/Downloads $ 
rmyorston commented 5 months ago

Indeed. It's been broken since the FRP-4716 release.

Please try the latest prerelease (PRE-5312 or above).