Skip to content

Commit 75c27f1

Browse files
Until #441 happens, provide a @chdir macro for convenience.
Can be used as follows: @chdir dir begin # do stuff from dir end
1 parent 1d8c9cf commit 75c27f1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

base/util.jl

+2
Original file line numberDiff line numberDiff line change
@@ -421,3 +421,5 @@ function chdir(f::Function, dir::String)
421421
throw(err)
422422
end
423423
end
424+
425+
macro chdir(dir,ex); :(chdir(()->$ex,$dir)); end

0 commit comments

Comments
 (0)