Created
September 19, 2012 17:44
-
-
Save nigelkersten/3751041 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/fission/action/vm/starter.rb b/lib/fission/action/vm/starter.rb | |
index 1e0969a..0e7a317 100644 | |
--- a/lib/fission/action/vm/starter.rb | |
+++ b/lib/fission/action/vm/starter.rb | |
@@ -58,10 +58,13 @@ module Fission | |
end | |
end | |
+ headless = options[:headless] unless options[:headless].blank? | |
+ headless ||= Fission.config['headless'] unless Fission.config['headless'].nil? | |
+ | |
command = "#{vmrun_cmd} start " | |
command << "#{conf_file_response.data} " | |
- command << (options[:headless].blank? ? 'gui ' : 'nogui ') | |
+ command << (headless ? 'nogui ' : 'gui ') | |
command << '2>&1' | |
command_exec = Fission::Action::ShellExecutor.new command | |
diff --git a/lib/fission/config.rb b/lib/fission/config.rb | |
index 75442c0..5922380 100644 | |
--- a/lib/fission/config.rb | |
+++ b/lib/fission/config.rb | |
@@ -24,6 +24,7 @@ module Fission | |
@attributes['vmrun_bin'] = '/Library/Application Support/VMware Fusion/vmrun' | |
@attributes['plist_file'] = File.expand_path('~/Library/Preferences/com.vmware.fusion.plist') | |
@attributes['gui_bin'] = File.expand_path('/Applications/VMware Fusion.app/Contents/MacOS/vmware') | |
+ @attributes['headless'] = false | |
load_from_file | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment