Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor cleanup of logic in OSCommon#unix_uuid. #465

Merged
merged 1 commit into from
May 31, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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