chdir calls Dir.chdir when not parallel
This commit is contained in:
@ -212,13 +212,16 @@ module Cmdtest
|
|||||||
if block_given?
|
if block_given?
|
||||||
saved_cwd = @_cwd
|
saved_cwd = @_cwd
|
||||||
@_cwd = dir_path
|
@_cwd = dir_path
|
||||||
|
Dir.chdir(@_cwd) if @_runner.opts.parallel == 1
|
||||||
begin
|
begin
|
||||||
yield
|
yield
|
||||||
ensure
|
ensure
|
||||||
@_cwd = saved_cwd
|
@_cwd = saved_cwd
|
||||||
|
Dir.chdir(@_cwd) if @_runner.opts.parallel == 1
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@_cwd = dir_path
|
@_cwd = dir_path
|
||||||
|
Dir.chdir(@_cwd) if @_runner.opts.parallel == 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user