Running `gdk update` on a fresh GDK clone fails
Overview
When running a gdk update
on a fresh GDK clone, the command fails:
$ gdk update
ℹ️ gdk update: before hook -> cd gitlab && bin/spring stop || true
# frozen_string_literal: true
sh: line 0: cd: gitlab: No such file or directory
--------------------------------------------------------------------------------
Running self-update on GDK
--------------------------------------------------------------------------------
Already on 'master'
--------------------------------------------------------------------------------
Running self-update on GDK
--------------------------------------------------------------------------------
Already on 'master'
rake aborted!
PG_VERSION not found in /private/tmp/gitlab-development-kit/postgresql/data/PG_VERSION. Is PostgreSQL initialized?
/private/tmp/gitlab-development-kit/lib/gdk/postgresql.rb:28:in `current_version'
/private/tmp/gitlab-development-kit/lib/gdk/postgresql.rb:60:in `upgrade_needed?'
/private/tmp/gitlab-development-kit/lib/tasks/setup.rake:17:in `block in <top (required)>'
Tasks: TOP => preflight-update-checks
(See full trace by running task with --trace)
make: *** [preflight-update-checks] Error 1
❌️ ERROR: Failed to update.
-------------------------------------------------------
You can try the following that may be of assistance:
- Run 'gdk doctor'.
- Visit the troubleshooting documentation:
https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/master/doc/troubleshooting.md.
- Visit https://gitlab.com/gitlab-org/gitlab-development-kit/-/issues to
see if there are known issues.
-------------------------------------------------------
cc @eread
Proposal
Ideally, gdk update
should run like gdk install
on a fresh GDK clone, even if gdk install
has not previously been run.
Edited by Ash McKenzie