Skip to content

Commit

Permalink
fix: don't respect cargo-dist's install hints for curl-sh exprs
Browse files Browse the repository at this point in the history
The dist-manifest.json fundamentally lacks the information to generate perfect pretty curl-sh exprs, because it needs to be uploaded before the create-release endpoint tells us this url format. As such, oranda should ignore the manifest for these install-hints, and instead use the inference backend for them, which can use the URLs returned by the list-releases endpoint (or the github release's base url).
  • Loading branch information
Gankra committed Dec 19, 2023
1 parent aba8a57 commit 60ab1fd
Show file tree
Hide file tree
Showing 4 changed files with 115 additions and 112 deletions.
5 changes: 4 additions & 1 deletion src/data/cargo_dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,14 @@ impl ReleaseArtifacts {
{
preference = InstallerPreference::Custom;
None
} else if id.ends_with(".sh") || id.ends_with(".ps1") {
// We have more info to do a better job than cargo-dist on
// `curl | sh` exprs, inference will handle this for us!
continue;
} else {
preference = InstallerPreference::Script;
file
};

method = InstallMethod::Run {
file,
run_hint: install_hint.clone(),
Expand Down
Loading

0 comments on commit 60ab1fd

Please sign in to comment.