Skip to content

Commit

Permalink
Merge pull request #465 from inspec/zenspider/cleanup
Browse files Browse the repository at this point in the history
Minor cleanup of logic in OSCommon#unix_uuid.
  • Loading branch information
Ryan Davis authored May 31, 2019
2 parents 2b8423b + 5fd60ec commit 44e9ec6
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/train/platforms/detect/helpers/os_common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,10 @@ def cisco_show_version
end

def unix_uuid
uuid = unix_uuid_from_chef
uuid = unix_uuid_from_machine_file if uuid.nil?
uuid = uuid_from_command if uuid.nil?
raise Train::TransportError, 'Cannot find a UUID for your node.' if uuid.nil?
uuid
(unix_uuid_from_chef ||
unix_uuid_from_machine_file ||
uuid_from_command ||
raise(Train::TransportError, 'Cannot find a UUID for your node.'))
end

def unix_uuid_from_chef
Expand Down

0 comments on commit 44e9ec6

Please sign in to comment.