mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
allow passing a command line argument for credentials file
This commit is contained in:
parent
27deaf7a94
commit
121f4ed8e5
1 changed files with 3 additions and 1 deletions
4
bin/fog
4
bin/fog
|
@ -3,7 +3,9 @@ require File.join(File.dirname(__FILE__), '..', 'lib', 'fog')
|
|||
require 'irb'
|
||||
require 'yaml'
|
||||
|
||||
if File.exists?(File.expand_path('~/.fog'))
|
||||
if ARGV[0] && File.exists?(File.expand_path(ARGV[0]))
|
||||
@credentials = YAML.load(File.open(File.expand_path(ARGV[0])).read)
|
||||
elsif File.exists?(File.expand_path('~/.fog'))
|
||||
@credentials = YAML.load(File.open(File.expand_path('~/.fog')).read)
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue