Permalink
Browse files

Interpolating the environment is now invalid

  • Loading branch information...
1 parent 059b454 commit c33a48a2c9776853cfaf67a0d0ec0de39c2d60f5 @mike-burns mike-burns committed Aug 29, 2012
Showing with 5 additions and 5 deletions.
  1. +5 −5 lib/cocaine/command_line.rb
@@ -33,11 +33,11 @@ def initialize(binary, params = "", options = {})
@binary = binary.dup
@params = params.dup
@options = options.dup
+ @runner = best_runner
@logger = @options.delete(:logger) || self.class.logger
@swallow_stderr = @options.delete(:swallow_stderr)
- @expected_outcodes = @options.delete(:expected_outcodes)
- @expected_outcodes ||= [0]
- @runner = best_runner
+ @expected_outcodes = @options.delete(:expected_outcodes) || [0]
+ @environment = @options.delete(:environment) || {}
end
def command
@@ -78,7 +78,7 @@ def execute(command)
end
def environment
- self.class.environment.merge(@options[:environment]||{})
+ self.class.environment.merge(@environment)
end
def best_runner
@@ -101,7 +101,7 @@ def interpolate(pattern, vars)
end
def invalid_variables
- %w(expected_outcodes swallow_stderr logger)
+ %w(expected_outcodes swallow_stderr logger environment)
end
def interpolation(vars, key)

0 comments on commit c33a48a

Please sign in to comment.