fix: Handle browser paths with spaces correctly

Resolves an issue where browser paths containing spaces in the BROWSER
environment variable (e.g., '/mnt/c/Program Files/Mozilla Firefox/firefox.exe')
were causing "No such file or directory" errors on WSL environments.

The fix properly quotes the path when executing the browser command,
ensuring compatibility with Windows applications accessed through WSL.

Tested on Ubuntu 24.04 WSL with Windows Firefox installation.
This commit is contained in:
Mohanad Ghali 2025-03-28 01:05:31 +03:00
parent a223125abc
commit aab1d76a1d

View file

@ -298,4 +298,4 @@ if (( print_only )); then
fi
# open it in a browser
${BROWSER:-$open} "$openurl"
"${BROWSER:-$open}" "$openurl"