From c2833856e0f4a6fa316e51d76dff6fbc6bbfcfe0 Mon Sep 17 00:00:00 2001 From: Alex Suraci Date: Fri, 16 Dec 2011 11:47:19 -0800 Subject: [PATCH] fix vmc push prompting even with -n Change-Id: Ie7927b2c49ea1d36688faf8b737f0cf0552693ae --- lib/cli/commands/apps.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/cli/commands/apps.rb b/lib/cli/commands/apps.rb index 1af098bd..19d13d4e 100644 --- a/lib/cli/commands/apps.rb +++ b/lib/cli/commands/apps.rb @@ -814,7 +814,7 @@ def do_stop(appname) end def do_push(appname=nil) - unless @app_info + unless @app_info || no_prompt @manifest = { "applications" => { @path => { "name" => appname } } } interact @@ -882,12 +882,13 @@ def do_push(appname=nil) if ignore_framework framework = VMC::Cli::Framework.new - else - f = info(:framework) + elsif f = info(:framework) info = Hash[f["info"].collect { |k, v| [k.to_sym, v] }] framework = VMC::Cli::Framework.new(f["name"], info) exec = framework.exec if framework && framework.exec + else + framework = detect_framework(prompt_ok) end err "Application Type undetermined for path '#{@application}'" unless framework @@ -929,7 +930,7 @@ def do_push(appname=nil) existing = Set.new(client.services.collect { |s| s[:name] }) - if services = @app_info["services"] + if @app_info && services = @app_info["services"] services.each do |name, info| unless existing.include? name create_service_banner(info["type"], name, true)