lib/negroku/cli.rb in negroku-1.1.0 vs lib/negroku/cli.rb in negroku-1.1.1
- old
+ new
@@ -50,17 +50,14 @@
say "============"
menu.prompt = "Please choose your repository?".bright()
menu.select_by = :index
# find local remote from git repo
- if File.directory?(".git")
- local_repos = %x(git remote -v | awk '{print $2}' | uniq).split("\n")
- local_repos.each do |url|
- menu.choice(url) do |server|
- say("Using #{server}")
- data[:repo] = server;
- end
+ %x(git remote -v 2> /dev/null | awk '{print $2}' | uniq).split("\n").each do |url|
+ menu.choice(url) do |server|
+ say("Using #{server}")
+ data[:repo] = server;
end
end
# add other repo choice
menu.choice(:other) {
@@ -163,10 +160,10 @@
desc "show", "Show the current remote variables"
def show
%x(cap #{options[:stage]} rbenv:vars:show)
end
- desc "add", "Adds env variables to the remote server"
+ desc "add", "Adds or updates env variables to the remote server"
method_option :local, :type => :boolean, :aliases => "-l"
def add(key=nil, value=nil)
# Check if the paramenter were sent in the call
# Ask for the value if only the key was sent