Skip to content

Commit

Permalink
🐛 Made ARGV capture functional
Browse files Browse the repository at this point in the history
Because of Thor use in the bootloader, the existing ARGV contents were cleared out when any reference occurred. Now the ARGV is cloned at object instantiation.
  • Loading branch information
mkarlesky committed Jul 16, 2024
1 parent a8c0834 commit e70fbb2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/ceedling/system_wrapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ def self.time_stopwatch_s
return Process.clock_gettime( Process::CLOCK_MONOTONIC, :float_second )
end

def initialize()
@argv = ARGV.clone.freeze
end

# class method so as to be mockable for tests
def windows?
return SystemWrapper.windows?
Expand All @@ -43,8 +47,8 @@ def search_paths
return ENV['PATH'].split(File::PATH_SEPARATOR)
end

def cmdline_args
return ARGV
def get_cmdline
return @argv
end

def env_set(name, value)
Expand Down

0 comments on commit e70fbb2

Please sign in to comment.