From 4a724ce40ea2385ab58872d7be2bb34744e8c9d4 Mon Sep 17 00:00:00 2001 From: Kevin Ballard Date: Tue, 30 May 2017 21:10:42 -0700 Subject: [PATCH] Fix usage of osascript in help Work around a macOS osascript bug in 10.12.5 which prevented help from working. See #4035. (cherry picked from commit 3061eed6474cf9e5740b1ab64fba153386039246) --- share/functions/help.fish | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/functions/help.fish b/share/functions/help.fish index 034564cbb..e002b9450 100644 --- a/share/functions/help.fish +++ b/share/functions/help.fish @@ -131,7 +131,8 @@ function help --description 'Show help for the fish shell' # OS X /usr/bin/open swallows fragments (anchors), so use osascript # Eval is just a cheesy way of removing the hash escaping if test "$fish_browser" = osascript - osascript -e 'open location "'(eval echo $page_url)'"' + set -l opencmd 'open location "'(eval echo $page_url)'"' + osascript -e 'try' -e $opencmd -e 'on error' -e $opencmd -e 'end try' return end