Skip to content

Commit

Permalink
Merge pull request #7046 from hayd/dont_shell_out
Browse files Browse the repository at this point in the history
FIX don't shell out when you can mv
  • Loading branch information
JeffBezanson committed Jun 9, 2014
2 parents 247e7f8 + 4f1de15 commit b771481
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions base/pkg/write.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ end
function install(pkg::String, sha1::String)
prefetch(pkg, sha1)
if isdir(".trash/$pkg")
run(`mv .trash/$pkg ./`)
mv(".trash/$pkg", "./$pkg")
else
Git.run(`clone -q $(Cache.path(pkg)) $pkg`)
end
Expand All @@ -40,7 +40,7 @@ end
function remove(pkg::String)
isdir(".trash") || mkdir(".trash")
ispath(".trash/$pkg") && run(`rm -rf .trash/$pkg`)
run(`mv $pkg .trash/`)
mv(pkg, ".trash/$pkg")
end

end # module

0 comments on commit b771481

Please sign in to comment.