File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -89,10 +89,12 @@ jobs:
89
89
run : |
90
90
mkdir -p ~/custom-bin
91
91
echo '#!/bin/bash' > ~/custom-bin/open
92
- echo 'if [[ "$1" =~ ^https?:// ]]; then' >> ~/custom-bin/open
93
- echo ' "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" "$@"' >> ~/custom-bin/open
92
+ echo 'if [[ "$1" == http* ]]; then' >> ~/custom-bin/open
93
+ echo ' # Open URLs in Chrome in the background' >> ~/custom-bin/open
94
+ echo ' nohup /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome "$1" &>/dev/null &' >> ~/custom-bin/open
94
95
echo 'else' >> ~/custom-bin/open
95
- echo ' /usr/bin/open "$@"' >> ~/custom-bin/open
96
+ echo ' # Fallback to the default open command for non-URL files' >> ~/custom-bin/open
97
+ echo ' /usr/bin/open "$@"' >> ~/custom-bin/open
96
98
echo 'fi' >> ~/custom-bin/open
97
99
chmod +x ~/custom-bin/open
98
100
You can’t perform that action at this time.
0 commit comments