Skip to content
Snippets Groups Projects
Commit 495ff815 authored by Jacob Vosmaer (GitLab)'s avatar Jacob Vosmaer (GitLab)
Browse files

Show usage for gdk init when root not found

parent 52aef98b
No related branches found
No related tags found
1 merge request!213Improve "GDK_ROOT not found" message
Loading
Loading
@@ -14,6 +14,7 @@ module GDK
DOTFILE = File.expand_path('~/.gdk.yml')
TRUSTED_KEY = 'trusted_directories'
ROOT_CHECK_FILE = '.gdk-install-root'
DEFAULT_INIT_DIRECTORY = File.join(Dir.pwd, 'gitlab-development-kit')
 
def self.launcher_main
case ARGV.first
Loading
Loading
@@ -25,7 +26,7 @@ module GDK
puts "Usage: gdk init [DIR]"
return false
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})
system(*cmd) && trust!(directory) && remember!(directory)
when 'trust'
Loading
Loading
@@ -43,6 +44,8 @@ module GDK
|installation. Use 'cd' to go to your gitlab-development-kit or create
|a new one with 'gdk init'.
|
|gdk init [DIRECTORY] # Default: #{DEFAULT_INIT_DIRECTORY}
|
EOS
return false
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment