Skip to content

Commit

Permalink
Merge pull request #9112 from JuliaLang/tk/fix-pkg-testdir
Browse files Browse the repository at this point in the history
use tempdir instead of tempname in test/pkg.jl
  • Loading branch information
tkelman committed Nov 22, 2014
2 parents 83f8018 + dd6cd5a commit 10f9289
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion base/pkg/dir.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function init(meta::String=DEFAULT_META, branch::String=META_BRANCH)
run(`touch REQUIRE`)
end
catch e
rm(dir, recursive=true)
ispath(dir) && rm(dir, recursive=true)
rethrow(e)
end
end
Expand Down
2 changes: 1 addition & 1 deletion test/pkg.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function temp_pkg_dir(fn::Function)
# Used in tests below to setup and teardown a sandboxed package directory
const tmpdir = ENV["JULIA_PKGDIR"] = tempname()
const tmpdir = ENV["JULIA_PKGDIR"] = joinpath(tempdir(),randstring())
@test !isdir(Pkg.dir())
try
Pkg.init()
Expand Down

0 comments on commit 10f9289

Please sign in to comment.