Skip to content

Commit

Permalink
Change Linux to Unix where appropriate
Browse files Browse the repository at this point in the history
Signed-off-by: Jerry Aldrich <[email protected]>
  • Loading branch information
jerryaldrichiii committed Jul 31, 2018
1 parent 9434a27 commit c5987b2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/train/file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def md5sum
'md5sum'
end

perform_checksum_linux(@md5_command)
perform_checksum_unix(@md5_command)
end

checksum || perform_checksum_ruby(:md5)
Expand All @@ -168,15 +168,15 @@ def sha256sum
'sha256sum'
end

perform_checksum_linux(@sha256_command)
perform_checksum_unix(@sha256_command)
end

checksum || perform_checksum_ruby(:sha256)
end

private

def perform_checksum_linux(cmd)
def perform_checksum_unix(cmd)
res = @backend.run_command("#{cmd} #{@path}")
res.stdout.split(' ').first if res.exit_status == 0
end
Expand Down

0 comments on commit c5987b2

Please sign in to comment.