We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c49b0d3 commit 9028e46Copy full SHA for 9028e46
base/pkg/cache.jl
@@ -3,7 +3,7 @@ module Cache
3
import ..Git
4
using ..Types
5
6
-import ..Dir: pkgroot
+import ..Dir: pkgroot, path
7
8
path(pkg::String) = abspath(".cache", pkg)
9
@@ -16,17 +16,11 @@ function mkcachedir()
16
@windows_only mkdir(cache)
17
@unix_only begin
18
rootcache = joinpath(realpath(pkgroot()), ".cache")
19
- if rootcache == cache
20
- mkdir(cache)
21
- elseif isdir(rootcache)
22
- try
23
- ln(rootcache, cache)
24
- catch
25
26
- end
27
- else
+ if !isdir(rootcache)
28
mkdir(rootcache)
29
- mkcachedir()
+ end
+ if rootcache != cache
+ run(`ln -s $rootcache $cache`)
30
end
31
32
0 commit comments