Skip to content

Commit

Permalink
fix: absolute path generation in the fake/say
Browse files Browse the repository at this point in the history
  • Loading branch information
smileart committed Jan 26, 2017
1 parent e2741c4 commit dfdf810
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions test/fake/say
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,8 @@ if options[:voice]
end

if options[:file]
current_dir = File.expand_path(File.dirname(__FILE__))
file_path = options[:file]
file_path = File.expand_path File.join(current_dir, file_path)
file_path = File.absolute_path file_path, File.dirname(__FILE__)

File.exist?(file_path) ? exit(0) : exit(127)
end
Expand Down

0 comments on commit dfdf810

Please sign in to comment.