From aab1d76a1dff5d808558ed566ddb07b891085ff9 Mon Sep 17 00:00:00 2001 From: Mohanad Ghali Date: Fri, 28 Mar 2025 01:05:31 +0300 Subject: [PATCH] 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. --- git-open | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-open b/git-open index 7dcae92..ddcf395 100755 --- a/git-open +++ b/git-open @@ -298,4 +298,4 @@ if (( print_only )); then fi # open it in a browser -${BROWSER:-$open} "$openurl" +"${BROWSER:-$open}" "$openurl"