Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions lib/Zef/Client.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -1076,9 +1076,10 @@ class Zef::Client {
# for instance).
my %curfs-new-args = :prefix($staging-at), :name($stage-for-repo.name), :next-repo($stage-for-repo);
my $curfs-short-name = 'CompUnit::Repository::Staging';
(::($curfs-short-name) !~~ Failure)
?? ::($curfs-short-name).new(|%curfs-new-args)
!! do {
my $curfs-class := do given ::($curfs-short-name) {
when Failure {
.handled = True;

# Find CURS from the core repository so we can load it by path later
my $core-repo = CompUnit::RepositoryRegistry.repository-for-name('core');
my $curs-dist = $core-repo.resolve(CompUnit::DependencySpecification.new(:short-name($curfs-short-name))).distribution;
Expand All @@ -1089,8 +1090,11 @@ class Zef::Client {
my $curs-handle = $curs-dist.content($curs-name-path);
$curs-handle.close(); # I think these handles shouldn't be opened already from ::InstalledDistribution :(
$*REPO.load($curs-handle.path);
::($curfs-short-name).new(|%curfs-new-args);
::($curfs-short-name);
}
default { $_ }
}
$curfs-class.new(|%curfs-new-args);
}

# Staging workflow
Expand Down
Loading