`gdk reset-data` fails when the gitlab directory is symlinked

Overview

When the gitlab directory is symlinked into the gdk directory, gdk reset-data tries to use a relative path, which fails.

gdk reset-data fails with this output:

--------------------------------------------------------------------------------
Ensuring necessary data services are running
--------------------------------------------------------------------------------
ok: run: /home/mark/dev/gdk/services/postgresql: (pid 689029) 2s, normally down
ok: run: /home/mark/dev/gdk/services/redis: (pid 689028) 2s, normally down
ok: run: /home/mark/dev/gdk/services/praefect: (pid 689613) 1s, normally down
ok: run: /home/mark/dev/gdk/services/praefect-gitaly-0: (pid 689614) 1s, normally down
ok: run: /home/mark/dev/gdk/services/postgresql: (pid 689029) 3s, normally down
ok: run: /home/mark/dev/gdk/services/redis: (pid 689028) 3s, normally down
Waiting for praefect to boot..OK
/home/mark/.asdf/lib/commands/command-env.bash: line 18: ../support/bundle-exec: No such file or directory
ERROR: 'support/exec-cd gitlab ../support/bundle-exec rake db:reset' failed. Retrying in 2 secs..
/home/mark/.asdf/lib/commands/command-env.bash: line 18: ../support/bundle-exec: No such file or directory
ERROR: 'support/exec-cd gitlab ../support/bundle-exec rake db:reset' failed. Retrying in 2 secs..
/home/mark/.asdf/lib/commands/command-env.bash: line 18: ../support/bundle-exec: No such file or directory
ERROR: 'support/exec-cd gitlab ../support/bundle-exec rake db:reset' failed. Retrying in 2 secs..
/home/mark/.asdf/lib/commands/command-env.bash: line 18: ../support/bundle-exec: No such file or directory
ERROR: 'support/exec-cd gitlab ../support/bundle-exec rake db:reset' failed.
ERROR: The command 'support/exec-cd gitlab ../support/bundle-exec rake db:reset' failed. Try to run it again with:

support/exec-cd gitlab ../support/bundle-exec rake db:reset

Impacted categories

The following categories relate to this issue:

Steps to replicate (optional)

Symlink the gitlab directory into GDK.

For example, I have:

  • GDK in ~/dev/gdk
  • GitLab in ~/dev/gitlab/gitlab
  • ~/dev/gdk/gitlab symlinked to ~/dev/gitlab/gitlab

Proposal (optional)

Maybe something similar to the fix in !2923 (merged)?

Environment (optional)

  • Operating system name: Linux mark-desktop 5.15.0-58-generic #64-Ubuntu SMP Thu Jan 5 11:43:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
  • Architecture: x86_64
  • Ruby version: ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c5) [x86_64-linux]
  • GDK version: aa86913e