Skip to content

Commit

Permalink
Expand all user-input paths to absolute paths
Browse files Browse the repository at this point in the history
  • Loading branch information
shinokaro committed Jul 27, 2024
1 parent fac27f0 commit 6bc650c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/ocran/option.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def parse(argv)
@options[:add_all_core?] = true
when "--output"
path = argv.shift
@options[:output_override] = Pathname.new(path) if path
@options[:output_override] = Pathname.new(path).expand_path if path
when "--dll"
path = argv.shift
@options[:extra_dlls] << path if path
Expand All @@ -125,17 +125,17 @@ def parse(argv)
when "--icon"
path = argv.shift
raise "Icon file #{path} not found" unless path && File.exist?(path)
@options[:icon_filename] = Pathname.new(path)
@options[:icon_filename] = Pathname.new(path).expand_path
when "--rubyopt"
@options[:rubyopt] = argv.shift
when "--gemfile"
path = argv.shift
raise "Gemfile #{path} not found" unless path && File.exist?(path)
@options[:gemfile] = Pathname.new(path)
@options[:gemfile] = Pathname.new(path).expand_path
when "--innosetup"
path = argv.shift
raise "Inno Script #{path} not found" unless path && File.exist?(path)
@options[:inno_setup_script] = Pathname.new(path)
@options[:inno_setup_script] = Pathname.new(path).expand_path
when "--no-autodll"
@options[:auto_detect_dlls?] = false
when "--version"
Expand Down

0 comments on commit 6bc650c

Please sign in to comment.