Skip to content

Commit

Permalink
feat: support TablePlus application located in setapp directory (#5815)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterkraume committed Feb 10, 2024
1 parent 2acaec4 commit 3ee26bb
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions pkg/ddevapp/global_dotddev_assets/commands/host/tableplus
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
## Usage: tableplus
## Example: "ddev tableplus"
## OSTypes: darwin,wsl2
## HostBinaryExists: /Applications/TablePlus.app,/mnt/c/Program Files/TablePlus/TablePlus.exe
## HostBinaryExists: /Applications/TablePlus.app,/Applications/Setapp/TablePlus.app,/mnt/c/Program Files/TablePlus/TablePlus.exe

if [ "${DDEV_PROJECT_STATUS}" != "running" ]; then
echo "Project ${DDEV_PROJECT} is not running, starting it"
Expand All @@ -26,7 +26,11 @@ case $OSTYPE in
"/mnt/c/Program Files/TablePlus/TablePlus.exe" $query >/dev/null &
;;
"darwin"*)
set -x
open "$query" -a "/Applications/TablePlus.app/Contents/MacOS/TablePlus"
set -eu -o pipefail
if [ -d "/Applications/Setapp/TablePlus.app" ]; then
open "$query" -a "/Applications/Setapp/TablePlus.app/Contents/MacOS/TablePlus"
else
open "$query" -a "/Applications/TablePlus.app/Contents/MacOS/TablePlus"
fi
;;
esac

0 comments on commit 3ee26bb

Please sign in to comment.