mirror of
https://github.com/inspec/inspec
synced 2024-11-30 16:39:20 +00:00
Support credentials file with multiple sections
Signed-off-by: Stuart Preston <stuart@chef.io>
This commit is contained in:
parent
5a52dfe3f9
commit
002aa73e7d
1 changed files with 2 additions and 2 deletions
|
@ -26,8 +26,8 @@ class AzureConnection
|
||||||
# If a connection already exists then return it
|
# If a connection already exists then return it
|
||||||
return @conn if defined?(@conn)
|
return @conn if defined?(@conn)
|
||||||
|
|
||||||
# Determine if only one subscription is specified in the configuration file, if so use that
|
# Determine if more than one subscription is specified in the configuration file, if so use the first one
|
||||||
if @credentials.sections.length == 1
|
if @credentials.sections.length >= 1
|
||||||
@subscription_id = @credentials.sections[0]
|
@subscription_id = @credentials.sections[0]
|
||||||
else
|
else
|
||||||
@subscription_id = ENV['AZURE_SUBSCRIPTION_ID']
|
@subscription_id = ENV['AZURE_SUBSCRIPTION_ID']
|
||||||
|
|
Loading…
Reference in a new issue