Skip to content
Snippets Groups Projects

Improve "GDK_ROOT not found" message

Merged Jacob Vosmaer (GitLab) requested to merge root-not-found-message into master
1 file
+ 4
1
Compare changes
  • Side-by-side
  • Inline
+ 4
1
@@ -14,6 +14,7 @@ module GDK
@@ -14,6 +14,7 @@ module GDK
DOTFILE = File.expand_path('~/.gdk.yml')
DOTFILE = File.expand_path('~/.gdk.yml')
TRUSTED_KEY = 'trusted_directories'
TRUSTED_KEY = 'trusted_directories'
ROOT_CHECK_FILE = '.gdk-install-root'
ROOT_CHECK_FILE = '.gdk-install-root'
 
DEFAULT_INIT_DIRECTORY = File.join(Dir.pwd, 'gitlab-development-kit')
def self.launcher_main
def self.launcher_main
case ARGV.first
case ARGV.first
@@ -25,7 +26,7 @@ module GDK
@@ -25,7 +26,7 @@ module GDK
puts "Usage: gdk init [DIR]"
puts "Usage: gdk init [DIR]"
return false
return false
end
end
directory = ARGV.count == 2 ? ARGV[1] : 'gitlab-development-kit'
directory = ARGV.count == 2 ? ARGV[1] : DEFAULT_INIT_DIRECTORY
cmd = %W(git clone https://gitlab.com/gitlab-org/gitlab-development-kit.git #{directory})
cmd = %W(git clone https://gitlab.com/gitlab-org/gitlab-development-kit.git #{directory})
system(*cmd) && trust!(directory) && remember!(directory)
system(*cmd) && trust!(directory) && remember!(directory)
when 'trust'
when 'trust'
@@ -43,6 +44,8 @@ module GDK
@@ -43,6 +44,8 @@ module GDK
|installation. Use 'cd' to go to your gitlab-development-kit or create
|installation. Use 'cd' to go to your gitlab-development-kit or create
|a new one with 'gdk init'.
|a new one with 'gdk init'.
|
|
 
|gdk init [DIRECTORY] # Default: #{DEFAULT_INIT_DIRECTORY}
 
|
EOS
EOS
return false
return false
end
end
Loading