Skip to content

Commit 93a697e

Browse files
committed
Fix artifact downloader constants and improve error message for hosted package-bin
1 parent 7fa6fd0 commit 93a697e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/StaticPHP/Artifact/ArtifactDownloader.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,14 @@
3636
*/
3737
class ArtifactDownloader
3838
{
39+
/** @var array<string, class-string<DownloadTypeInterface>> */
3940
public const array DOWNLOADERS = [
4041
'bitbuckettag' => BitBucketTag::class,
4142
'filelist' => FileList::class,
4243
'git' => Git::class,
4344
'ghrel' => GitHubRelease::class,
44-
'ghtar', 'ghtagtar' => GitHubTarball::class,
45+
'ghtar' => GitHubTarball::class,
46+
'ghtagtar' => GitHubTarball::class,
4547
'local' => LocalDir::class,
4648
'pie' => PIE::class,
4749
'url' => Url::class,

src/StaticPHP/Artifact/Downloader/Type/HostedPackageBin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,6 @@ public function download(string $name, array $config, ArtifactDownloader $downlo
5858
return DownloadResult::archive($filename, $config, extract: $config['extract'] ?? null, version: $version);
5959
}
6060
}
61-
throw new DownloaderException("No matching asset found for hosted package-bin {$name} with criteria: {$find_str}");
61+
throw new DownloaderException("No matching asset found for hosted package-bin {$name}: {$find_str}");
6262
}
6363
}

0 commit comments

Comments
 (0)