diff --git a/cargo-dist/src/backend/ci/mod.rs b/cargo-dist/src/backend/ci/mod.rs index c16af6bfd..a994c624d 100644 --- a/cargo-dist/src/backend/ci/mod.rs +++ b/cargo-dist/src/backend/ci/mod.rs @@ -77,6 +77,8 @@ pub enum DistInstallStrategy { installer_url: String, /// the installer name, without `.sh` or `.ps1` installer_name: String, + /// the version to install, used for cargo install fallback + version: String, }, /// Run `cargo install --git` (slow!) GitBranch { @@ -97,6 +99,7 @@ impl DistInstallSettings<'_> { return DistInstallStrategy::Installer { installer_url: url.as_str().to_owned(), installer_name: "cargo-dist-installer".to_owned(), + version: self.version.to_string(), }; } @@ -116,6 +119,7 @@ impl DistInstallSettings<'_> { // to compute these values for packages we build *BUT* it's messy and not that important installer_url: format!("{BASE_DIST_FETCH_URL}/v{version}"), installer_name, + version: version.to_string(), } } } @@ -124,8 +128,8 @@ impl InstallStrategy for DistInstallStrategy { /// Returns a bit of sh/dash to install the requested version of dist fn dash(&self) -> GhaRunStep { DashScript::new(match self { - DistInstallStrategy::Installer { installer_url, installer_name } => format!( - "curl --proto '=https' --tlsv1.2 -LsSf {installer_url}/{installer_name}.sh | sh" + DistInstallStrategy::Installer { installer_url, installer_name, version } => format!( + "curl --proto '=https' --tlsv1.2 -LsSf {installer_url}/{installer_name}.sh | sh || cargo install cargo-dist --locked --version {version}" ), DistInstallStrategy::GitBranch { branch } => format!( "cargo install --git https://github.com/axodotdev/cargo-dist/ --branch={branch} --locked cargo-dist" @@ -136,8 +140,8 @@ impl InstallStrategy for DistInstallStrategy { /// Returns a bit of powershell to install the requested version of dist fn powershell(&self) -> GhaRunStep { PowershellScript::new(match self { - DistInstallStrategy::Installer { installer_url, installer_name } => format!( - "irm {installer_url}/{installer_name}.ps1 | iex" + DistInstallStrategy::Installer { installer_url, installer_name, version } => format!( + "try {{ irm {installer_url}/{installer_name}.ps1 | iex }} catch {{ cargo install cargo-dist --locked --version {version} }}" ), DistInstallStrategy::GitBranch { branch } => format!( "cargo install --git https://github.com/axodotdev/cargo-dist/ --branch={branch} --locked cargo-dist" diff --git a/cargo-dist/tests/gallery/dist/snapshot.rs b/cargo-dist/tests/gallery/dist/snapshot.rs index 124050090..f941fa40f 100644 --- a/cargo-dist/tests/gallery/dist/snapshot.rs +++ b/cargo-dist/tests/gallery/dist/snapshot.rs @@ -152,6 +152,10 @@ pub fn snapshot_settings_with_gallery_filter() -> insta::Settings { r"cargo-dist/releases/download/v\d+\.\d+\.\d+(\-prerelease\d*)?(\.\d+)?/", "cargo-dist/releases/download/vSOME_VERSION/", ); + settings.add_filter( + r"cargo install cargo-dist --locked --version \d+\.\d+\.\d+(\-prerelease\d*)?(\.\d+)?", + "cargo install cargo-dist --locked --version SOME_VERSION", + ); settings.add_filter(r#"sha256 ".*""#, r#"sha256 "CENSORED""#); settings.add_filter(r#""sha256": .*"#, r#""sha256": "CENSORED""#); settings.add_filter(r#""sha512": .*"#, r#""sha512": "CENSORED""#); diff --git a/cargo-dist/tests/snapshots/akaikatana_basic.snap b/cargo-dist/tests/snapshots/akaikatana_basic.snap index a97d81a49..dc523dd23 100644 --- a/cargo-dist/tests/snapshots/akaikatana_basic.snap +++ b/cargo-dist/tests/snapshots/akaikatana_basic.snap @@ -2545,7 +2545,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -2558,7 +2558,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -2571,7 +2571,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -2584,7 +2584,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -2670,7 +2670,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/akaikatana_bins.snap b/cargo-dist/tests/snapshots/akaikatana_bins.snap index 0fd517323..344733135 100644 --- a/cargo-dist/tests/snapshots/akaikatana_bins.snap +++ b/cargo-dist/tests/snapshots/akaikatana_bins.snap @@ -2539,7 +2539,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -2552,7 +2552,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -2565,7 +2565,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -2578,7 +2578,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -2664,7 +2664,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/akaikatana_musl.snap b/cargo-dist/tests/snapshots/akaikatana_musl.snap index ece5cc1c9..9c18193d8 100644 --- a/cargo-dist/tests/snapshots/akaikatana_musl.snap +++ b/cargo-dist/tests/snapshots/akaikatana_musl.snap @@ -1851,7 +1851,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -1864,7 +1864,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -1877,7 +1877,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -1890,7 +1890,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-musl", "targets": [ @@ -1977,7 +1977,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/akaikatana_one_alias_among_many_binaries.snap b/cargo-dist/tests/snapshots/akaikatana_one_alias_among_many_binaries.snap index 181952b43..a00d9a8c3 100644 --- a/cargo-dist/tests/snapshots/akaikatana_one_alias_among_many_binaries.snap +++ b/cargo-dist/tests/snapshots/akaikatana_one_alias_among_many_binaries.snap @@ -2576,7 +2576,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -2589,7 +2589,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -2602,7 +2602,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -2615,7 +2615,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -2701,7 +2701,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/akaikatana_two_bin_aliases.snap b/cargo-dist/tests/snapshots/akaikatana_two_bin_aliases.snap index 9297e84d6..561aea322 100644 --- a/cargo-dist/tests/snapshots/akaikatana_two_bin_aliases.snap +++ b/cargo-dist/tests/snapshots/akaikatana_two_bin_aliases.snap @@ -2603,7 +2603,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -2616,7 +2616,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -2629,7 +2629,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -2642,7 +2642,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -2728,7 +2728,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/akaikatana_updaters.snap b/cargo-dist/tests/snapshots/akaikatana_updaters.snap index 7f82c6f61..2d0c4ccbe 100644 --- a/cargo-dist/tests/snapshots/akaikatana_updaters.snap +++ b/cargo-dist/tests/snapshots/akaikatana_updaters.snap @@ -2589,7 +2589,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -2602,7 +2602,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -2615,7 +2615,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -2628,7 +2628,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -2714,7 +2714,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/axolotlsay_action_commit.snap b/cargo-dist/tests/snapshots/axolotlsay_action_commit.snap index 53e7d8ec8..216f98e1e 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_action_commit.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_action_commit.snap @@ -4092,7 +4092,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -4105,7 +4105,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=i686-unknown-linux-gnu", "targets": [ @@ -4119,7 +4119,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -4132,7 +4132,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-gnu", "targets": [ @@ -4145,7 +4145,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -4158,7 +4158,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -4243,7 +4243,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@ababcdcd with: diff --git a/cargo-dist/tests/snapshots/axolotlsay_alias.snap b/cargo-dist/tests/snapshots/axolotlsay_alias.snap index 047bcd110..3fc5489ea 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_alias.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_alias.snap @@ -4014,7 +4014,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -4027,7 +4027,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -4040,7 +4040,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -4053,7 +4053,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -4137,7 +4137,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/axolotlsay_alias_ignores_missing_bins.snap b/cargo-dist/tests/snapshots/axolotlsay_alias_ignores_missing_bins.snap index 3717040ba..0b8959c20 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_alias_ignores_missing_bins.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_alias_ignores_missing_bins.snap @@ -4016,7 +4016,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -4029,7 +4029,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -4042,7 +4042,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -4055,7 +4055,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -4139,7 +4139,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/axolotlsay_attestations_announce.snap b/cargo-dist/tests/snapshots/axolotlsay_attestations_announce.snap index 3b73950b5..93614a235 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_attestations_announce.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_attestations_announce.snap @@ -4092,7 +4092,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -4105,7 +4105,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=i686-unknown-linux-gnu", "targets": [ @@ -4119,7 +4119,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -4132,7 +4132,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-gnu", "targets": [ @@ -4145,7 +4145,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -4158,7 +4158,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -4244,7 +4244,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/axolotlsay_attestations_filters.snap b/cargo-dist/tests/snapshots/axolotlsay_attestations_filters.snap index 75887bdee..ca0f05131 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_attestations_filters.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_attestations_filters.snap @@ -4092,7 +4092,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -4105,7 +4105,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=i686-unknown-linux-gnu", "targets": [ @@ -4119,7 +4119,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -4132,7 +4132,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-gnu", "targets": [ @@ -4145,7 +4145,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -4158,7 +4158,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -4251,7 +4251,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/axolotlsay_attestations_host.snap b/cargo-dist/tests/snapshots/axolotlsay_attestations_host.snap index 4683607e5..ef8dd8e24 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_attestations_host.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_attestations_host.snap @@ -4092,7 +4092,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -4105,7 +4105,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=i686-unknown-linux-gnu", "targets": [ @@ -4119,7 +4119,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -4132,7 +4132,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-gnu", "targets": [ @@ -4145,7 +4145,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -4158,7 +4158,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -4244,7 +4244,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/axolotlsay_basic.snap b/cargo-dist/tests/snapshots/axolotlsay_basic.snap index fd3754575..8239b69ad 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_basic.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_basic.snap @@ -3803,7 +3803,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -3824,7 +3824,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-unknown-linux-gnu", "targets": [ @@ -3845,7 +3845,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=i686-unknown-linux-gnu", "targets": [ @@ -3867,7 +3867,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -3888,7 +3888,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-gnu", "targets": [ @@ -3909,7 +3909,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -3930,7 +3930,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -4022,7 +4022,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/axolotlsay_basic_bins.snap b/cargo-dist/tests/snapshots/axolotlsay_basic_bins.snap index 8fc4ea868..b849ae573 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_basic_bins.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_basic_bins.snap @@ -4226,7 +4226,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -4239,7 +4239,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=i686-unknown-linux-gnu", "targets": [ @@ -4253,7 +4253,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -4266,7 +4266,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-gnu", "targets": [ @@ -4279,7 +4279,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -4292,7 +4292,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -4376,7 +4376,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/axolotlsay_basic_lies.snap b/cargo-dist/tests/snapshots/axolotlsay_basic_lies.snap index d72067e26..140a96ca2 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_basic_lies.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_basic_lies.snap @@ -4084,7 +4084,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -4097,7 +4097,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -4110,7 +4110,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -4123,7 +4123,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -4207,7 +4207,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/axolotlsay_build_setup_steps.snap b/cargo-dist/tests/snapshots/axolotlsay_build_setup_steps.snap index 76499b387..1bfba7d1d 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_build_setup_steps.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_build_setup_steps.snap @@ -3981,7 +3981,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -3994,7 +3994,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -4007,7 +4007,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -4020,7 +4020,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -4104,7 +4104,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/axolotlsay_checksum_blake2b.snap b/cargo-dist/tests/snapshots/axolotlsay_checksum_blake2b.snap index ccaf19dae..b56503659 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_checksum_blake2b.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_checksum_blake2b.snap @@ -1831,7 +1831,7 @@ download_binary_and_run_installer "$@" || exit 1 "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -1844,7 +1844,7 @@ download_binary_and_run_installer "$@" || exit 1 "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -1857,7 +1857,7 @@ download_binary_and_run_installer "$@" || exit 1 "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -1870,7 +1870,7 @@ download_binary_and_run_installer "$@" || exit 1 "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -1954,7 +1954,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/axolotlsay_checksum_blake2s.snap b/cargo-dist/tests/snapshots/axolotlsay_checksum_blake2s.snap index 687216c54..92ac45715 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_checksum_blake2s.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_checksum_blake2s.snap @@ -1831,7 +1831,7 @@ download_binary_and_run_installer "$@" || exit 1 "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -1844,7 +1844,7 @@ download_binary_and_run_installer "$@" || exit 1 "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -1857,7 +1857,7 @@ download_binary_and_run_installer "$@" || exit 1 "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -1870,7 +1870,7 @@ download_binary_and_run_installer "$@" || exit 1 "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -1954,7 +1954,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/axolotlsay_checksum_sha3_256.snap b/cargo-dist/tests/snapshots/axolotlsay_checksum_sha3_256.snap index 4bd412056..d3c82d607 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_checksum_sha3_256.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_checksum_sha3_256.snap @@ -1831,7 +1831,7 @@ download_binary_and_run_installer "$@" || exit 1 "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -1844,7 +1844,7 @@ download_binary_and_run_installer "$@" || exit 1 "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -1857,7 +1857,7 @@ download_binary_and_run_installer "$@" || exit 1 "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -1870,7 +1870,7 @@ download_binary_and_run_installer "$@" || exit 1 "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -1954,7 +1954,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/axolotlsay_checksum_sha3_512.snap b/cargo-dist/tests/snapshots/axolotlsay_checksum_sha3_512.snap index c6abc2c42..c88e358c3 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_checksum_sha3_512.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_checksum_sha3_512.snap @@ -1831,7 +1831,7 @@ download_binary_and_run_installer "$@" || exit 1 "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -1844,7 +1844,7 @@ download_binary_and_run_installer "$@" || exit 1 "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -1857,7 +1857,7 @@ download_binary_and_run_installer "$@" || exit 1 "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -1870,7 +1870,7 @@ download_binary_and_run_installer "$@" || exit 1 "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -1954,7 +1954,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/axolotlsay_cross1.snap b/cargo-dist/tests/snapshots/axolotlsay_cross1.snap index 4604d0a68..03a4b40c0 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_cross1.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_cross1.snap @@ -2629,7 +2629,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -2647,7 +2647,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g }, "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-pc-windows-msvc", "targets": [ @@ -2661,7 +2661,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-unknown-linux-gnu", "targets": [ @@ -2675,7 +2675,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -2693,7 +2693,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g }, "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -2707,7 +2707,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -2791,7 +2791,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/axolotlsay_cross2.snap b/cargo-dist/tests/snapshots/axolotlsay_cross2.snap index ae43c6dca..7ffa87093 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_cross2.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_cross2.snap @@ -2292,7 +2292,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g }, "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-pc-windows-msvc", "targets": [ @@ -2311,7 +2311,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g }, "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-unknown-linux-gnu", "targets": [ @@ -2395,7 +2395,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/axolotlsay_custom_formula.snap b/cargo-dist/tests/snapshots/axolotlsay_custom_formula.snap index cbfb770e1..63a2265a3 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_custom_formula.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_custom_formula.snap @@ -339,7 +339,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -352,7 +352,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -365,7 +365,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -378,7 +378,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -446,7 +446,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/axolotlsay_custom_github_runners.snap b/cargo-dist/tests/snapshots/axolotlsay_custom_github_runners.snap index a13875ece..d570c6034 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_custom_github_runners.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_custom_github_runners.snap @@ -261,7 +261,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-unknown-linux-gnu", "targets": [ @@ -274,7 +274,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-unknown-linux-musl", "targets": [ @@ -288,7 +288,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -301,7 +301,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-musl", "targets": [ @@ -386,7 +386,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/axolotlsay_disable_source_tarball.snap b/cargo-dist/tests/snapshots/axolotlsay_disable_source_tarball.snap index 0f636304e..4097084f5 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_disable_source_tarball.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_disable_source_tarball.snap @@ -3969,7 +3969,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) axolotlsay-n "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -3982,7 +3982,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) axolotlsay-n "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -3995,7 +3995,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) axolotlsay-n "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -4008,7 +4008,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) axolotlsay-n "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -4092,7 +4092,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/axolotlsay_dispatch.snap b/cargo-dist/tests/snapshots/axolotlsay_dispatch.snap index b86b80d6a..924af5295 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_dispatch.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_dispatch.snap @@ -261,7 +261,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -274,7 +274,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -287,7 +287,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -300,7 +300,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -388,7 +388,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/axolotlsay_dist_url_override.snap b/cargo-dist/tests/snapshots/axolotlsay_dist_url_override.snap index 759ecafc7..7633fb4aa 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_dist_url_override.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_dist_url_override.snap @@ -2460,7 +2460,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://dl.bearcove.cloud/dump/dist-cross/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://dl.bearcove.cloud/dump/dist-cross/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -2473,7 +2473,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://dl.bearcove.cloud/dump/dist-cross/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://dl.bearcove.cloud/dump/dist-cross/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -2486,7 +2486,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://dl.bearcove.cloud/dump/dist-cross/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://dl.bearcove.cloud/dump/dist-cross/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -2499,7 +2499,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://dl.bearcove.cloud/dump/dist-cross/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://dl.bearcove.cloud/dump/dist-cross/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -2583,7 +2583,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://dl.bearcove.cloud/dump/dist-cross/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://dl.bearcove.cloud/dump/dist-cross/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/axolotlsay_edit_existing.snap b/cargo-dist/tests/snapshots/axolotlsay_edit_existing.snap index 75da3e5ad..bb62af8e5 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_edit_existing.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_edit_existing.snap @@ -3903,7 +3903,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -3916,7 +3916,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -3929,7 +3929,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -3942,7 +3942,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -4026,7 +4026,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/axolotlsay_generic_workspace_basic.snap b/cargo-dist/tests/snapshots/axolotlsay_generic_workspace_basic.snap index 773d38a4d..b50acc9cf 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_generic_workspace_basic.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_generic_workspace_basic.snap @@ -5014,7 +5014,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -5027,7 +5027,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -5040,7 +5040,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -5053,7 +5053,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -5137,7 +5137,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/axolotlsay_homebrew_linux_only.snap b/cargo-dist/tests/snapshots/axolotlsay_homebrew_linux_only.snap index 46015438e..c488810d9 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_homebrew_linux_only.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_homebrew_linux_only.snap @@ -184,7 +184,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -268,7 +268,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/axolotlsay_homebrew_macos_x86_64_only.snap b/cargo-dist/tests/snapshots/axolotlsay_homebrew_macos_x86_64_only.snap index 29490e97b..be4b20a61 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_homebrew_macos_x86_64_only.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_homebrew_macos_x86_64_only.snap @@ -187,7 +187,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -271,7 +271,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/axolotlsay_homebrew_packages.snap b/cargo-dist/tests/snapshots/axolotlsay_homebrew_packages.snap index 02f66b7f6..01971e065 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_homebrew_packages.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_homebrew_packages.snap @@ -3981,7 +3981,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -3995,7 +3995,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -4009,7 +4009,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -4022,7 +4022,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -4106,7 +4106,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/axolotlsay_musl.snap b/cargo-dist/tests/snapshots/axolotlsay_musl.snap index 84d61853b..d07aff0d8 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_musl.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_musl.snap @@ -3201,7 +3201,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -3214,7 +3214,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -3227,7 +3227,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -3240,7 +3240,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-musl", "targets": [ @@ -3325,7 +3325,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/axolotlsay_musl_no_gnu.snap b/cargo-dist/tests/snapshots/axolotlsay_musl_no_gnu.snap index 73ee9da13..425a914ab 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_musl_no_gnu.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_musl_no_gnu.snap @@ -3136,7 +3136,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -3149,7 +3149,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -3162,7 +3162,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-musl", "targets": [ @@ -3247,7 +3247,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/axolotlsay_no_homebrew_publish.snap b/cargo-dist/tests/snapshots/axolotlsay_no_homebrew_publish.snap index f73dcb021..20cdedaa7 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_no_homebrew_publish.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_no_homebrew_publish.snap @@ -3903,7 +3903,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -3916,7 +3916,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -3929,7 +3929,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -3942,7 +3942,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -4026,7 +4026,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/axolotlsay_no_locals.snap b/cargo-dist/tests/snapshots/axolotlsay_no_locals.snap index 1a28f0e42..afcb46a55 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_no_locals.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_no_locals.snap @@ -261,7 +261,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -274,7 +274,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -287,7 +287,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -300,7 +300,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -384,7 +384,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/axolotlsay_no_locals_but_custom.snap b/cargo-dist/tests/snapshots/axolotlsay_no_locals_but_custom.snap index 60175c087..966d435fb 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_no_locals_but_custom.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_no_locals_but_custom.snap @@ -261,7 +261,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -274,7 +274,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -287,7 +287,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -300,7 +300,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -368,7 +368,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/axolotlsay_several_aliases.snap b/cargo-dist/tests/snapshots/axolotlsay_several_aliases.snap index bddec44f0..16d1d866f 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_several_aliases.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_several_aliases.snap @@ -4020,7 +4020,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -4033,7 +4033,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -4046,7 +4046,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -4059,7 +4059,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -4143,7 +4143,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/axolotlsay_simple_and_order1.snap b/cargo-dist/tests/snapshots/axolotlsay_simple_and_order1.snap index 2180bb198..ac7338645 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_simple_and_order1.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_simple_and_order1.snap @@ -4198,7 +4198,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -4211,7 +4211,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-unknown-linux-gnu", "targets": [ @@ -4224,7 +4224,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=i686-unknown-linux-gnu", "targets": [ @@ -4238,7 +4238,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -4251,7 +4251,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-gnu", "targets": [ @@ -4264,7 +4264,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -4277,7 +4277,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -4361,7 +4361,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/axolotlsay_simple_and_order2.snap b/cargo-dist/tests/snapshots/axolotlsay_simple_and_order2.snap index 4bfa4d168..085c01c1d 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_simple_and_order2.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_simple_and_order2.snap @@ -4198,7 +4198,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -4211,7 +4211,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-unknown-linux-gnu", "targets": [ @@ -4224,7 +4224,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=i686-unknown-linux-gnu", "targets": [ @@ -4238,7 +4238,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -4251,7 +4251,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-gnu", "targets": [ @@ -4264,7 +4264,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -4277,7 +4277,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -4361,7 +4361,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/axolotlsay_simple_and_order_no_github.snap b/cargo-dist/tests/snapshots/axolotlsay_simple_and_order_no_github.snap index 7dc8e830b..17b0ca964 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_simple_and_order_no_github.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_simple_and_order_no_github.snap @@ -4192,7 +4192,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -4205,7 +4205,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-unknown-linux-gnu", "targets": [ @@ -4218,7 +4218,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=i686-unknown-linux-gnu", "targets": [ @@ -4232,7 +4232,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -4245,7 +4245,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-gnu", "targets": [ @@ -4258,7 +4258,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -4271,7 +4271,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -4355,7 +4355,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/axolotlsay_simple_only.snap b/cargo-dist/tests/snapshots/axolotlsay_simple_only.snap index e62f5f4a4..1cd129f39 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_simple_only.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_simple_only.snap @@ -4194,7 +4194,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -4207,7 +4207,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-unknown-linux-gnu", "targets": [ @@ -4220,7 +4220,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=i686-unknown-linux-gnu", "targets": [ @@ -4234,7 +4234,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -4247,7 +4247,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-gnu", "targets": [ @@ -4260,7 +4260,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -4273,7 +4273,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -4357,7 +4357,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/axolotlsay_ssldotcom_windows_sign.snap b/cargo-dist/tests/snapshots/axolotlsay_ssldotcom_windows_sign.snap index 0614dde21..3941c3040 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_ssldotcom_windows_sign.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_ssldotcom_windows_sign.snap @@ -2538,7 +2538,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -2551,7 +2551,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -2564,7 +2564,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -2577,7 +2577,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -2661,7 +2661,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/axolotlsay_ssldotcom_windows_sign_prod.snap b/cargo-dist/tests/snapshots/axolotlsay_ssldotcom_windows_sign_prod.snap index 0614dde21..3941c3040 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_ssldotcom_windows_sign_prod.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_ssldotcom_windows_sign_prod.snap @@ -2538,7 +2538,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -2551,7 +2551,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -2564,7 +2564,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -2577,7 +2577,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -2661,7 +2661,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/axolotlsay_tag_namespace.snap b/cargo-dist/tests/snapshots/axolotlsay_tag_namespace.snap index 70b62d5d7..a2cfef012 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_tag_namespace.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_tag_namespace.snap @@ -261,7 +261,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -274,7 +274,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -287,7 +287,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -300,7 +300,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -384,7 +384,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/axolotlsay_updaters.snap b/cargo-dist/tests/snapshots/axolotlsay_updaters.snap index 099e63f73..2f91ed928 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_updaters.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_updaters.snap @@ -4025,7 +4025,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -4038,7 +4038,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -4051,7 +4051,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -4064,7 +4064,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -4148,7 +4148,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/axolotlsay_user_global_build_job.snap b/cargo-dist/tests/snapshots/axolotlsay_user_global_build_job.snap index 307a34618..da18c8190 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_user_global_build_job.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_user_global_build_job.snap @@ -3903,7 +3903,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -3916,7 +3916,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -3929,7 +3929,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -3942,7 +3942,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -4026,7 +4026,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/axolotlsay_user_host_job.snap b/cargo-dist/tests/snapshots/axolotlsay_user_host_job.snap index 6cd17d4a0..86bb6c31c 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_user_host_job.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_user_host_job.snap @@ -3903,7 +3903,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -3916,7 +3916,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -3929,7 +3929,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -3942,7 +3942,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -4026,7 +4026,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/axolotlsay_user_local_build_job.snap b/cargo-dist/tests/snapshots/axolotlsay_user_local_build_job.snap index 195276142..ec3b25da7 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_user_local_build_job.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_user_local_build_job.snap @@ -3903,7 +3903,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -3916,7 +3916,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -3929,7 +3929,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -3942,7 +3942,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -4026,7 +4026,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/axolotlsay_user_plan_job.snap b/cargo-dist/tests/snapshots/axolotlsay_user_plan_job.snap index dd8a1d9fa..5c2173dce 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_user_plan_job.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_user_plan_job.snap @@ -3903,7 +3903,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -3916,7 +3916,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -3929,7 +3929,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -3942,7 +3942,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -4026,7 +4026,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/axolotlsay_user_publish_job.snap b/cargo-dist/tests/snapshots/axolotlsay_user_publish_job.snap index 158152faf..c20d99d9e 100644 --- a/cargo-dist/tests/snapshots/axolotlsay_user_publish_job.snap +++ b/cargo-dist/tests/snapshots/axolotlsay_user_publish_job.snap @@ -3903,7 +3903,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -3916,7 +3916,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -3929,7 +3929,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -3942,7 +3942,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -4026,7 +4026,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" - name: Cache dist uses: actions/upload-artifact@v7 with: diff --git a/cargo-dist/tests/snapshots/install_path_cargo_home.snap b/cargo-dist/tests/snapshots/install_path_cargo_home.snap index 4d4b84c96..3998fcd3b 100644 --- a/cargo-dist/tests/snapshots/install_path_cargo_home.snap +++ b/cargo-dist/tests/snapshots/install_path_cargo_home.snap @@ -2538,7 +2538,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -2551,7 +2551,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -2564,7 +2564,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -2577,7 +2577,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ diff --git a/cargo-dist/tests/snapshots/install_path_env_no_subdir.snap b/cargo-dist/tests/snapshots/install_path_env_no_subdir.snap index 95650be89..145475ce1 100644 --- a/cargo-dist/tests/snapshots/install_path_env_no_subdir.snap +++ b/cargo-dist/tests/snapshots/install_path_env_no_subdir.snap @@ -2514,7 +2514,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -2527,7 +2527,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -2540,7 +2540,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -2553,7 +2553,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ diff --git a/cargo-dist/tests/snapshots/install_path_env_subdir.snap b/cargo-dist/tests/snapshots/install_path_env_subdir.snap index 499ffa8e5..14ad8db83 100644 --- a/cargo-dist/tests/snapshots/install_path_env_subdir.snap +++ b/cargo-dist/tests/snapshots/install_path_env_subdir.snap @@ -2514,7 +2514,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -2527,7 +2527,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -2540,7 +2540,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -2553,7 +2553,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ diff --git a/cargo-dist/tests/snapshots/install_path_env_subdir_space.snap b/cargo-dist/tests/snapshots/install_path_env_subdir_space.snap index 4a0b683a6..6c6dbfcc8 100644 --- a/cargo-dist/tests/snapshots/install_path_env_subdir_space.snap +++ b/cargo-dist/tests/snapshots/install_path_env_subdir_space.snap @@ -2514,7 +2514,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -2527,7 +2527,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -2540,7 +2540,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -2553,7 +2553,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ diff --git a/cargo-dist/tests/snapshots/install_path_env_subdir_space_deeper.snap b/cargo-dist/tests/snapshots/install_path_env_subdir_space_deeper.snap index 6fb50077d..8ff9df956 100644 --- a/cargo-dist/tests/snapshots/install_path_env_subdir_space_deeper.snap +++ b/cargo-dist/tests/snapshots/install_path_env_subdir_space_deeper.snap @@ -2514,7 +2514,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -2527,7 +2527,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -2540,7 +2540,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -2553,7 +2553,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ diff --git a/cargo-dist/tests/snapshots/install_path_fallback_no_env_var_set.snap b/cargo-dist/tests/snapshots/install_path_fallback_no_env_var_set.snap index aa160ccf1..8ae936b4b 100644 --- a/cargo-dist/tests/snapshots/install_path_fallback_no_env_var_set.snap +++ b/cargo-dist/tests/snapshots/install_path_fallback_no_env_var_set.snap @@ -2537,7 +2537,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -2550,7 +2550,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -2563,7 +2563,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -2576,7 +2576,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ diff --git a/cargo-dist/tests/snapshots/install_path_home_subdir_deeper.snap b/cargo-dist/tests/snapshots/install_path_home_subdir_deeper.snap index eb63fb491..15b3b173b 100644 --- a/cargo-dist/tests/snapshots/install_path_home_subdir_deeper.snap +++ b/cargo-dist/tests/snapshots/install_path_home_subdir_deeper.snap @@ -2514,7 +2514,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -2527,7 +2527,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -2540,7 +2540,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -2553,7 +2553,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ diff --git a/cargo-dist/tests/snapshots/install_path_home_subdir_min.snap b/cargo-dist/tests/snapshots/install_path_home_subdir_min.snap index 2a1883093..44eda3379 100644 --- a/cargo-dist/tests/snapshots/install_path_home_subdir_min.snap +++ b/cargo-dist/tests/snapshots/install_path_home_subdir_min.snap @@ -2514,7 +2514,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -2527,7 +2527,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -2540,7 +2540,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -2553,7 +2553,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ diff --git a/cargo-dist/tests/snapshots/install_path_home_subdir_space.snap b/cargo-dist/tests/snapshots/install_path_home_subdir_space.snap index 37ac3ab4a..e13bde819 100644 --- a/cargo-dist/tests/snapshots/install_path_home_subdir_space.snap +++ b/cargo-dist/tests/snapshots/install_path_home_subdir_space.snap @@ -2514,7 +2514,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -2527,7 +2527,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -2540,7 +2540,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -2553,7 +2553,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ diff --git a/cargo-dist/tests/snapshots/install_path_home_subdir_space_deeper.snap b/cargo-dist/tests/snapshots/install_path_home_subdir_space_deeper.snap index 3be6292ac..a59e6a6d2 100644 --- a/cargo-dist/tests/snapshots/install_path_home_subdir_space_deeper.snap +++ b/cargo-dist/tests/snapshots/install_path_home_subdir_space_deeper.snap @@ -2514,7 +2514,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -2527,7 +2527,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -2540,7 +2540,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -2553,7 +2553,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ diff --git a/cargo-dist/tests/snapshots/install_path_no_fallback_taken.snap b/cargo-dist/tests/snapshots/install_path_no_fallback_taken.snap index 5b73eedc2..b217d19b7 100644 --- a/cargo-dist/tests/snapshots/install_path_no_fallback_taken.snap +++ b/cargo-dist/tests/snapshots/install_path_no_fallback_taken.snap @@ -2537,7 +2537,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -2550,7 +2550,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -2563,7 +2563,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version SOME_VERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -2576,7 +2576,7 @@ CENSORED (see https://github.com/axodotdev/cargo-dist/issues/1477) source.tar.g "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version SOME_VERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ diff --git a/cargo-dist/tests/snapshots/manifest.snap b/cargo-dist/tests/snapshots/manifest.snap index b820d7492..e5dd5e975 100644 --- a/cargo-dist/tests/snapshots/manifest.snap +++ b/cargo-dist/tests/snapshots/manifest.snap @@ -525,7 +525,7 @@ stdout: "host": "aarch64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v1.0.0-FAKEVERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v1.0.0-FAKEVERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version 1.0.0-FAKEVERSION" }, "dist_args": "--artifacts=local --target=aarch64-apple-darwin", "targets": [ @@ -543,7 +543,7 @@ stdout: }, "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v1.0.0-FAKEVERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v1.0.0-FAKEVERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version 1.0.0-FAKEVERSION" }, "dist_args": "--artifacts=local --target=aarch64-unknown-linux-gnu", "targets": [ @@ -562,7 +562,7 @@ stdout: }, "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v1.0.0-FAKEVERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v1.0.0-FAKEVERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version 1.0.0-FAKEVERSION" }, "dist_args": "--artifacts=local --target=aarch64-unknown-linux-musl", "targets": [ @@ -576,7 +576,7 @@ stdout: "host": "x86_64-apple-darwin", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v1.0.0-FAKEVERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v1.0.0-FAKEVERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version 1.0.0-FAKEVERSION" }, "dist_args": "--artifacts=local --target=x86_64-apple-darwin", "targets": [ @@ -589,7 +589,7 @@ stdout: "host": "x86_64-pc-windows-msvc", "install_dist": { "shell": "pwsh", - "run": "irm https://github.com/axodotdev/cargo-dist/releases/download/v1.0.0-FAKEVERSION/cargo-dist-installer.ps1 | iex" + "run": "try { irm https://github.com/axodotdev/cargo-dist/releases/download/v1.0.0-FAKEVERSION/cargo-dist-installer.ps1 | iex } catch { cargo install cargo-dist --locked --version 1.0.0-FAKEVERSION }" }, "dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc", "targets": [ @@ -602,7 +602,7 @@ stdout: "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v1.0.0-FAKEVERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v1.0.0-FAKEVERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version 1.0.0-FAKEVERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu", "targets": [ @@ -615,7 +615,7 @@ stdout: "host": "x86_64-unknown-linux-gnu", "install_dist": { "shell": "sh", - "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v1.0.0-FAKEVERSION/cargo-dist-installer.sh | sh" + "run": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v1.0.0-FAKEVERSION/cargo-dist-installer.sh | sh || cargo install cargo-dist --locked --version 1.0.0-FAKEVERSION" }, "dist_args": "--artifacts=local --target=x86_64-unknown-linux-musl", "targets": [