Skip to content

Commit

Permalink
Prepend inst# to home when setting up repositories
Browse files Browse the repository at this point in the history
The keys to the $repos hash are in the form of inst#/path/to/repo (among
others), but $home was just the path before this change, causing all
nqp::atkey($repos, $home) calls to come back as null
  • Loading branch information
hoelzro committed Jun 18, 2018
1 parent 61878c3 commit 91b211a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/core/CompUnit/RepositoryRegistry.pm6
Expand Up @@ -95,8 +95,7 @@ class CompUnit::RepositoryRegistry {
(nqp::existskey($ENV,'HOMEPATH')
?? nqp::atkey($ENV,'HOMEPATH') !! '')
) -> $home-path {
$home = "$home-path/.perl6";
my str $path = "inst#$home";
$home = "inst#$home-path/.perl6";
}
}

Expand Down Expand Up @@ -147,7 +146,7 @@ class CompUnit::RepositoryRegistry {
CompUnit::Repository::Installation.new(:prefix("$prefix/site"), :$next-repo)
)) unless nqp::existskey($unique, $site);
nqp::bindkey($custom-lib, 'home', $next-repo := self!register-repository(
"inst#$home/.perl6",
$home,
CompUnit::Repository::Installation.new(:prefix($home), :$next-repo)
)) if $home and not nqp::existskey($unique, $home);
}
Expand Down

0 comments on commit 91b211a

Please sign in to comment.