Open cnt0 opened 8 months ago
It fails on Windows too (using busybox-w32).
mason.nvim [Core utils] ~
- WARNING unzip: not available
- ADVICE:
- spawn: unzip failed with exit code 1 and signal 0. BusyBox v1.37.0-FRP-5236-g7dff7f376 (2023-12-06 10:31:32 GMT)
Usage: unzip [-lnojpqK] FILE[.zip] [FILE]... [-x FILE]... [-d DIR]
Extract FILEs from ZIP archive
-l List contents (with -q for short form)
-n Never overwrite files (default: ask)
-o Overwrite
-j Do not restore paths
-p Write to stdout
-t Test
-q Quiet
-K Do not clear SUID bit
-x FILE Exclude FILEs
-d DIR Extract into DIR
- WARNING wget: not available
- ADVICE:
- spawn: wget failed with exit code 1 and signal 0. BusyBox v1.37.0-FRP-5236-g7dff7f376 (2023-12-06 10:31:32 GMT)
Usage: wget [-cqS] [--spider] [-O FILE] [-o LOGFILE] [--header STR]
[--post-data STR | --post-file FILE] [-Y on/off]
[-P DIR] [-U AGENT] URL...
Retrieve files via HTTP or FTP
--spider Only check URL existence: $? is 0 if exists
--header STR Add STR (of form 'header: value') to headers
--post-data STR Send STR using POST method
--post-file FILE Send FILE using POST method
-c Continue retrieval of aborted transfer
-q Quiet
-P DIR Save to DIR (default .)
-S Show server response
-O FILE Save to FILE ('-' for stdout)
-o LOGFILE Log messages to FILE
-U STR Use STR for User-Agent header
-Y on/off Use proxy
wget: unknown option -- version
- OK curl: `curl 8.4.0 (Windows) libcurl/8.4.0 Schannel WinIDN
`
- WARNING gzip: not available
- ADVICE:
- spawn: gzip failed with exit code 1 and signal 0. BusyBox v1.37.0-FRP-5236-g7dff7f376 (2023-12-06 10:31:32 GMT)
Usage: gzip [-cfkdt123456789] [FILE]...
Compress FILEs (or stdin)
-1..9 Compression level
-d Decompress
-c Write to stdout
-f Force
-k Keep input files
-t Test integrity
gzip: unknown option -- version
- OK tar: `bsdtar 3.6.2 - libarchive 3.6.2 zlib/1.2.5.f-ipp liblzma/5.2.5 bz2lib/1.0.8 libzstd/1.5.4
`
- OK pwsh: `7.4.1 Microsoft Windows 10.0.22631 Win32NT
`
- WARNING 7z: not available
- ADVICE:
- spawn: 7z failed with exit code - and signal -. 7z is not executable
The issue is most of these is that checking for "version" is not supported in Alpine binaries.
λ docker run -it alpine
/ # gzip version
gzip: version: No such file or directory
/ # gzip --version
gzip: unrecognized option: version
BusyBox v1.36.1 (2023-11-07 18:53:09 UTC) multi-call binary.
Usage: gzip [-cfkdt123456789] [FILE]...
Compress FILEs (or stdin)
-1..9 Compression level
-d Decompress
-c Write to stdout
-f Force
-k Keep input files
-t Test integrity
/ # wget version
wget: bad address 'version'
/ # wget --version
wget: unrecognized option: version
BusyBox v1.36.1 (2023-11-07 18:53:09 UTC) multi-call binary.
Usage: wget [-cqS] [--spider] [-O FILE] [-o LOGFILE] [--header STR]
[--post-data STR | --post-file FILE] [-Y on/off]
[-P DIR] [-U AGENT] [-T SEC] URL...
Retrieve files via HTTP or FTP
--spider Only check URL existence: $? is 0 if exists
--header STR Add STR (of form 'header: value') to headers
--post-data STR Send STR using POST method
--post-file FILE Send FILE using POST method
-c Continue retrieval of aborted transfer
-q Quiet
-P DIR Save to DIR (default .)
-S Show server response
-T SEC Network read timeout is SEC seconds
-O FILE Save to FILE ('-' for stdout)
-o LOGFILE Log messages to FILE
-U STR Use STR for User-Agent header
-Y on/off Use proxy
Assuming used flags are universal,
I propose using which
command instead and achieve the exact same effect:
λ docker run -it alpine
/ # which gzip
/bin/gzip
/ # echo $?
0
/ # which wget
/usr/bin/wget
/ # echo $?
0
/ # which not_present_command
/ # echo $?
1
Hmmm... Seems "--help" could also work:
λ docker run -it alpine
/ # gzip --help
BusyBox v1.36.1 (2023-11-07 18:53:09 UTC) multi-call binary.
Usage: gzip [-cfkdt123456789] [FILE]...
Compress FILEs (or stdin)
-1..9 Compression level
-d Decompress
-c Write to stdout
-f Force
-k Keep input files
-t Test integrity
/ # echo $?
0
/ # wget --help
BusyBox v1.36.1 (2023-11-07 18:53:09 UTC) multi-call binary.
Usage: wget [-cqS] [--spider] [-O FILE] [-o LOGFILE] [--header STR]
[--post-data STR | --post-file FILE] [-Y on/off]
[-P DIR] [-U AGENT] [-T SEC] URL...
Retrieve files via HTTP or FTP
--spider Only check URL existence: $? is 0 if exists
--header STR Add STR (of form 'header: value') to headers
--post-data STR Send STR using POST method
--post-file FILE Send FILE using POST method
-c Continue retrieval of aborted transfer
-q Quiet
-P DIR Save to DIR (default .)
-S Show server response
-T SEC Network read timeout is SEC seconds
-O FILE Save to FILE ('-' for stdout)
-o LOGFILE Log messages to FILE
-U STR Use STR for User-Agent header
-Y on/off Use proxy
/ # echo $?
0
Also consistency is needed, some commands use "--help" and others "--version": https://github.com/williamboman/mason.nvim/blob/main/lua/mason/health.lua
I've searched open issues for similar requests
I've recently downloaded the latest plugin version of mason.nvim
Problem description
Hello. I'm trying to run
:Mason
command in neovim installed in alpine linux system, and getting an error mentioned in title. I've actually found the cause of this problem, so TLDR:Mason falls back to using
wget
command because there's nocurl
installed. However,wget
provided by alpine linux out of box is not the "default" wget, and it expects different command line args (see attached logs). So it fails because of that. Indeed, I easily fixed the problem by installing curl, but nonetherless, this error is confusing. Also, as shown by healthcheck, there might be similar problems with other commands likeunzip
as well (but I have yet to face such problems)Expected behavior
:Mason
works with no errorsAffected packages
All
Mason output
No response
Installation log
Neovim version (>= 0.7)
NVIM v0.9.4 Build type: MinSizeRel LuaJIT 2.1.0-beta3
Operating system/version
Linux alpine 6.7.0-0-edge #1-Alpine SMP PREEMPT_DYNAMIC Thu, 11 Jan 2024 15:05:06 +0000 x86_64 Linux
Healthcheck
Screenshots
No response