Repository: axodotdev/cargo-dist
Pull request #353 (2023-08-23 18:28:23)

fix(init): Homebrew messages were incorrect
The Homebrew messages were associated with the wrong side of the if statement.


Patch:
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 3f10e6a1..b4cbd00a 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -50,6 +50,7 @@ jobs:
     runs-on: ubuntu-latest
     outputs:
       has-releases: ${{ steps.create-release.outputs.has-releases }}
+      releases: ${{ steps.create-release.outputs.releases }}
     env:
       GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
     steps:
@@ -57,7 +58,7 @@ jobs:
         with:
           submodules: recursive
       - name: Install cargo-dist
-        run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.2.0-prerelease.2/cargo-dist-installer.sh | sh"
+        run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.2.0-prerelease.4/cargo-dist-installer.sh | sh"
       - id: create-release
         run: |
           cargo dist plan --tag=${{ github.ref_name }} --output-format=json > dist-manifest.json
@@ -78,9 +79,10 @@ jobs:
           # Disable all the upload-artifacts tasks if we have no actual releases
           HAS_RELEASES=$(jq --raw-output ".releases != null" dist-manifest.json)
           echo "has-releases=$HAS_RELEASES" >> "$GITHUB_OUTPUT"
+          echo "releases=$(jq --compact-output ".releases" dist-manifest.json)" >> "$GITHUB_OUTPUT"
 
-  # Build and packages all the things
-  upload-artifacts:
+  # Build and packages all the platform-specific things
+  upload-local-artifacts:
     # Let the initial task tell us to not run (currently very blunt)
     needs: create-release
     if: ${{ needs.create-release.outputs.has-releases == 'true' }}
@@ -89,22 +91,18 @@ jobs:
       matrix:
         # For these target platforms
         include:
-        - os: "ubuntu-20.04"
-          dist-args: "--artifacts=global"
-          install-dist: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.2.0-prerelease.2/cargo-dist-installer.sh | sh"
         - os: "macos-11"
           dist-args: "--artifacts=local --target=aarch64-apple-darwin"
-          install-dist: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.2.0-prerelease.2/cargo-dist-installer.sh | sh"
+          install-dist: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.2.0-prerelease.4/cargo-dist-installer.sh | sh"
         - os: "macos-11"
           dist-args: "--artifacts=local --target=x86_64-apple-darwin"
-          install-dist: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.2.0-prerelease.2/cargo-dist-installer.sh | sh"
+          install-dist: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.2.0-prerelease.4/cargo-dist-installer.sh | sh"
         - os: "windows-2019"
           dist-args: "--artifacts=local --target=x86_64-pc-windows-msvc"
-          install-dist: "irm  https://github.com/axodotdev/cargo-dist/releases/download/v0.2.0-prerelease.2/cargo-dist-installer.ps1 | iex"
+          install-dist: "irm  https://github.com/axodotdev/cargo-dist/releases/download/v0.2.0-prerelease.4/cargo-dist-installer.ps1 | iex"
         - os: "ubuntu-20.04"
           dist-args: "--artifacts=local --target=x86_64-unknown-linux-gnu"
-          install-dist: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.2.0-prerelease.2/cargo-dist-installer.sh | sh"
-
+          install-dist: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.2.0-prerelease.4/cargo-dist-installer.sh | sh"
     runs-on: ${{ matrix.os }}
     env:
       GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -132,11 +130,75 @@ jobs:
           gh release upload ${{ github.ref_name }} $(cat uploads.txt)
           echo "uploaded!"
 
+  # Build and packages all the platform-agnostic(ish) things
+  upload-global-artifacts:
+    needs: upload-local-artifacts
+    runs-on: "ubuntu-20.04"
+    env:
+      GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+    steps:
+      - uses: actions/checkout@v3
+        with:
+          submodules: recursive
+      - name: Install cargo-dist
+        run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.2.0-prerelease.4/cargo-dist-installer.sh | sh"
+      # Get all the local artifacts for the global tasks to use (for e.g. checksums)
+      - name: Fetch local artifacts
+        run: |
+          gh release download ${{ github.ref_name }} --dir target/distrib/
+      - name: Run cargo-dist
+        # This logic is a bit janky because it's trying to be a polyglot between
+        # powershell and bash since this will run on windows, macos, and linux!
+        # The two platforms don't agree on how to talk about env vars but they
+        # do agree on 'cat' and '$()' so we use that to marshal values between commands.
+        run: |
+          cargo dist build --tag=${{ github.ref_name }} --output-format=json "--artifacts=global" > dist-manifest.json
+          echo "dist ran successfully"
+          cat dist-manifest.json
+
+          # Parse out what we just built and upload it to the Github Release™
+          jq --raw-output ".artifacts[]?.path | select( . != null )" dist-manifest.json > uploads.txt
+          echo "uploading..."
+          cat uploads.txt
+          gh release upload ${{ github.ref_name }} $(cat uploads.txt)
+          echo "uploaded!"
+
+  upload-homebrew-formula:
+    needs: [create-release, upload-global-artifacts]
+    runs-on: "ubuntu-20.04"
+    env:
+      GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+      RELEASES: ${{ needs.create-release.outputs.releases }}
+      GITHUB_USER: "axo bot"
+      GITHUB_EMAIL: "admin+bot@axo.dev"
+    steps:
+      - uses: actions/checkout@v3
+        with:
+          repository: "axodotdev/homebrew-tap"
+          token: ${{ secrets.HOMEBREW_TAP_TOKEN }}
+      # So we have access to the formula
+      - name: Fetch local artifacts
+        run: |
+          gh release download ${{ github.ref_name }} --dir Formula --repo ${GITHUB_REPOSITORY} --clobber
+      - name: Commit formula files
+        run: |
+          git config --global user.name "${GITHUB_USER}"
+          git config --global user.email "${GITHUB_EMAIL}"
+
+          for release in $(echo "$RELEASES" | jq --compact-output '.[]'); do
+            name=$(echo "$release" | jq .app_name --raw-output)
+            version=$(echo "$release" | jq .app_version --raw-output)
+
+            git add Formula/${name}.rb
+            git commit -m "${name} ${version}"
+          done
+          git push
+
   # Mark the Github Release™ as a non-draft now that everything has succeeded!
   publish-release:
     # Only run after all the other tasks, but it's ok if upload-artifacts was skipped
-    needs: [create-release, upload-artifacts]
-    if: ${{ always() && needs.create-release.result == 'success' && (needs.upload-artifacts.result == 'skipped' || needs.upload-artifacts.result == 'success') }}
+    needs: [create-release, upload-local-artifacts, upload-global-artifacts]
+    if: ${{ always() && needs.create-release.result == 'success' && (needs.upload-local-artifacts.result == 'skipped' || needs.upload-local-artifacts.result == 'success') && (needs.upload-global-artifacts.result == 'skipped' || needs.upload-global-artifacts.result == 'success') }}
     runs-on: ubuntu-latest
     env:
       GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/Cargo.toml b/Cargo.toml
index 3c43d5f4..3bf493f1 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,11 +13,13 @@ pre-release-commit-message = "release: {{version}}"
 # Config for 'cargo dist'
 [workspace.metadata.dist]
 # The preferred cargo-dist version to use in CI (Cargo.toml SemVer syntax)
-cargo-dist-version = "0.1.0-prerelease.11"
+cargo-dist-version = "0.2.0-prerelease.4"
 # CI backends to support (see 'cargo dist generate-ci')
 ci = ["github"]
 # The installers to generate for each app
 installers = ["shell", "powershell", "homebrew"]
+# A GitHub repo to push Homebrew formulas to
+tap = "axodotdev/homebrew-tap"
 # Target platforms to build apps for (Rust target-triple syntax)
 targets = ["x86_64-unknown-linux-gnu", "x86_64-apple-darwin", "x86_64-pc-windows-msvc", "aarch64-apple-darwin"]
 
diff --git a/book/src/config.md b/book/src/config.md
index 874ce097..c670f39c 100644
--- a/book/src/config.md
+++ b/book/src/config.md
@@ -125,6 +125,16 @@ This is a list of installers you want to be made for your application(s). In pri
 See "repository" for some discussion on the "Artifact Download URL".
 
 
+### tap
+
+> since 0.2.0
+
+Example: `tap = "axodotdev/homebrew-formulae"`
+
+This is the name of a GitHub repository which cargo-dist should publish the Homebrew installer to. It must already exist, and the token which creates releases must have write access.
+
+See the [installers documentation][homebrew-installer] for more information on Homebrew support.
+
 ### include
 
 > since 0.0.3
@@ -241,14 +251,14 @@ Precise-builds are considered required when you use any of [features](#features)
 So for instance if you have several packages in your workspace and only one sets:
 
 ```toml
-[package.metadata.dist] 
+[package.metadata.dist]
 all-features = true
 ```
 
 Then we will require precise-builds, and will pass `--all-features` to only the `cargo build` for that package. This setting, on the other hand:
 
 ```toml
-[workspace.metadata.dist] 
+[workspace.metadata.dist]
 all-features = true
 ```
 
@@ -394,6 +404,7 @@ Caveat: the default "host" Artifact Mode does something fuzzier with `--target`
 [installers]: ./installers.md
 [shell-installer]: ./installers.md#shell
 [powershell-installer]: ./installers.md#powershell
+[homebrew-installer]: ./installers.md#homebrew
 [artifact-url]: ./installers.md#artifact-download-url
 [scope]: https://docs.npmjs.com/cli/v9/using-npm/scope
 [npm installers]: ./installers.md#npm
diff --git a/book/src/installers.md b/book/src/installers.md
index c12db085..0de77ce3 100644
--- a/book/src/installers.md
+++ b/book/src/installers.md
@@ -16,6 +16,7 @@ Currently supported installers include:
 * "shell": a shell script that fetches and installs executables
 * "powershell": a powershell script that fetches and installs executables
 * "npm": an npm project that fetches and runs executables (e.g. via npx)
+* "homebrew": a Homebrew formula that fetches and installs executables
 
 These keys can be specified via [`installer` in your cargo-dist config][installer-config]. The [`cargo dist init` command][init] provides an interactive UI for enabling/disabling them.
 
@@ -40,7 +41,7 @@ Limitations/Caveats:
 
 * Requires a well-defined [artifact download URL][artifact-download-url]
 * Currently only really designed for "linux" and "macOS", and won't detect other platforms properly (and certainly won't play nice with things like nixOS).
-* [Cannot detect situations where musl-based builds are appropriate][musl] (static or dynamic) 
+* [Cannot detect situations where musl-based builds are appropriate][musl] (static or dynamic)
 * [Relies on the user's installation of `tar` and `unzip` to unpack the files][unpacking]
 * Relies on the the user's installation of `curl` or `wget` to fetch the files
 * [Will throw out all files except for the binary, so the binary can't rely on assets included in the archive][issue-unpack-all]
@@ -91,7 +92,7 @@ Limitations/Caveats:
 
 * Requires a well-defined [artifact download URL][artifact-download-url]
 * Currently only really designed for "native windows", and won't detect other platforms properly
-* [Cannot detect situations where musl-based builds are appropriate][musl] (static or dynamic) 
+* [Cannot detect situations where musl-based builds are appropriate][musl] (static or dynamic)
 * [Relies on the user's installation of `tar` and `Expand-Archive` to unpack the files][unpacking]
 * Relies on the the user's installation of `Net.Webclient` to fetch the files
 * [Won't work if run in cmd instead of powershell][issue-irm-iex]
@@ -169,7 +170,7 @@ The package will also include an npm-shrinkwrap.json file for the npm packages t
 Limitations/Caveats:
 
 * Requires a well-defined [artifact download URL][artifact-download-url]
-* [Cannot detect situations where musl-based builds are appropriate][musl] (static or dynamic) 
+* [Cannot detect situations where musl-based builds are appropriate][musl] (static or dynamic)
 * [Relies on nodejs's builtin gzip support to unpack the files, which only works with .tar.gz][unpacking]
 * Cannot run any kind of custom install logic
 
@@ -177,6 +178,27 @@ As a result of the `.tar.gz` limitation, `cargo dist init` will prompt you to ch
 
 
 
+### Homebrew
+
+> since 0.2.0
+
+This provides a [Homebrew](https://brew.sh) formula which allows users to `brew install` your package. Since it installs to a location on the user's `PATH`, it provides a simple and convenient installation method for users who already have Homebrew available. When published to a [tap](https://docs.brew.sh/Taps) (package repository), this gives your users an easy way to both install your package and to keep it up to date using `brew update` and `brew upgrade`. It fetches the same prebuilt macOS binaries as the shell installer.
+
+cargo-dist can, optionally, publish your formula to a tap repository for you on every release. To enable this, add a `tap` field to your `Cargo.toml` pointing to a GitHub repository that you control. The repository name must start with `homebrew-`. For example:
+
+```toml
+tap = "axodotdev/homebrew-formulae"
+```
+
+In order to write to a tap GitHub repository, cargo-dist needs a [personal access token](https://github.com/settings/tokens/new?scopes=repo) with the `repo` scope exposed as `HOMEBREW_TAP_TOKEN`. For more information on GitHub Actions secrets, [consult this documentation](https://docs.github.com/en/actions/security-guides/encrypted-secrets).
+
+Limitations/Caveats:
+
+* Does not support creating a formula which builds from source
+* Does not support Linuxbrew (Homebrew on Linux)
+* Does not support [Cask][cask-issue] for more convenient GUI app installation
+
+
 
 ## Artifact Download URL
 
@@ -285,3 +307,4 @@ Although that's still missing things like [Windows crt-static workarounds][crt-s
 [cargo-manifest]: https://doc.rust-lang.org/cargo/reference/manifest.html
 [install-locked]: https://doc.rust-lang.org/cargo/commands/cargo-install.html#dealing-with-the-lockfile
 [crt-static]: https://github.com/rust-lang/rfcs/blob/master/text/1721-crt-static.md
+[cask-issue]: https://github.com/axodotdev/cargo-dist/issues/309
diff --git a/cargo-dist/src/backend/templates.rs b/cargo-dist/src/backend/templates.rs
index 44925e52..3f6d7b1c 100644
--- a/cargo-dist/src/backend/templates.rs
+++ b/cargo-dist/src/backend/templates.rs
@@ -195,7 +195,11 @@ impl Templates {
         val: &impl Serialize,
     ) -> DistResult<String> {
         let template = self.envs[file.env].get_template(file.path.as_str())?;
-        let rendered = template.render(val)?;
+        let mut rendered = template.render(val)?;
+        // minijinja strips trailing newlines from templates
+        if !rendered.ends_with('\n') {
+            rendered.push('\n');
+        }
         let cleaned = dos2unix(&rendered).into_owned();
         Ok(cleaned)
     }
diff --git a/cargo-dist/src/init.rs b/cargo-dist/src/init.rs
index fdb3b3c1..4eae6b36 100644
--- a/cargo-dist/src/init.rs
+++ b/cargo-dist/src/init.rs
@@ -471,11 +471,11 @@ fn get_new_dist_metadata(
             };
             let tap = tap.trim();
             if tap.is_empty() {
-                eprintln!("{check} Homebrew package will be published to {tap}");
+                eprintln!("Homebrew packages will not be automatically published");
                 meta.tap = None;
             } else {
                 meta.tap = Some(tap.to_owned());
-                eprintln!("{check} homebrew packages will not be automatically published");
+                eprintln!("{check} Homebrew package will be published to {tap}");
 
                 eprintln!(
                     r#"{check} You must provision a GitHub token and expose it as a secret named
diff --git a/cargo-dist/templates/ci/github_ci.yml.j2 b/cargo-dist/templates/ci/github_ci.yml.j2
index aea859d1..a7b9d792 100644
--- a/cargo-dist/templates/ci/github_ci.yml.j2
+++ b/cargo-dist/templates/ci/github_ci.yml.j2
@@ -171,6 +171,7 @@ jobs:
           echo "uploaded!"
 
 {{%- if tap %}}
+
   upload-homebrew-formula:
     needs: [create-release, upload-global-artifacts]
     runs-on: {{{ global_task.runner }}}


Test patch:
diff --git a/cargo-dist/tests/snapshots/akaikatana_basic.snap b/cargo-dist/tests/snapshots/akaikatana_basic.snap
index f5f8dac0..4556c0af 100644
--- a/cargo-dist/tests/snapshots/akaikatana_basic.snap
+++ b/cargo-dist/tests/snapshots/akaikatana_basic.snap
@@ -722,6 +722,7 @@ class AkaikatanaRepack < Formula
     pkgshare.install *leftover_contents unless leftover_contents.empty?
   end
 end
+
 ================ installer.ps1 ================
 # Licensed under the MIT license
 # <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
@@ -1408,6 +1409,7 @@ jobs:
           cat uploads.txt
           gh release upload ${{ github.ref_name }} $(cat uploads.txt)
           echo "uploaded!"
+
   upload-homebrew-formula:
     needs: [create-release, upload-global-artifacts]
     runs-on: "ubuntu-20.04"
@@ -1455,3 +1457,4 @@ jobs:
         run: |
           gh release edit ${{ github.ref_name }} --draft=false
 
+
diff --git a/cargo-dist/tests/snapshots/akaikatana_repo_with_dot_git.snap b/cargo-dist/tests/snapshots/akaikatana_repo_with_dot_git.snap
index f5f8dac0..4556c0af 100644
--- a/cargo-dist/tests/snapshots/akaikatana_repo_with_dot_git.snap
+++ b/cargo-dist/tests/snapshots/akaikatana_repo_with_dot_git.snap
@@ -722,6 +722,7 @@ class AkaikatanaRepack < Formula
     pkgshare.install *leftover_contents unless leftover_contents.empty?
   end
 end
+
 ================ installer.ps1 ================
 # Licensed under the MIT license
 # <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
@@ -1408,6 +1409,7 @@ jobs:
           cat uploads.txt
           gh release upload ${{ github.ref_name }} $(cat uploads.txt)
           echo "uploaded!"
+
   upload-homebrew-formula:
     needs: [create-release, upload-global-artifacts]
     runs-on: "ubuntu-20.04"
@@ -1455,3 +1457,4 @@ jobs:
         run: |
           gh release edit ${{ github.ref_name }} --draft=false
 
+
diff --git a/cargo-dist/tests/snapshots/axolotlsay_basic.snap b/cargo-dist/tests/snapshots/axolotlsay_basic.snap
index e1d97e09..10210d0b 100644
--- a/cargo-dist/tests/snapshots/axolotlsay_basic.snap
+++ b/cargo-dist/tests/snapshots/axolotlsay_basic.snap
@@ -723,6 +723,7 @@ class Axolotlsay < Formula
     pkgshare.install *leftover_contents unless leftover_contents.empty?
   end
 end
+
 ================ installer.ps1 ================
 # Licensed under the MIT license
 # <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
@@ -2275,6 +2276,7 @@ jobs:
           cat uploads.txt
           gh release upload ${{ github.ref_name }} $(cat uploads.txt)
           echo "uploaded!"
+
   upload-homebrew-formula:
     needs: [create-release, upload-global-artifacts]
     runs-on: "ubuntu-20.04"
@@ -2322,3 +2324,4 @@ jobs:
         run: |
           gh release edit ${{ github.ref_name }} --draft=false
 
+
diff --git a/cargo-dist/tests/snapshots/install_path_cargo_home.snap b/cargo-dist/tests/snapshots/install_path_cargo_home.snap
index 380de767..1a7eb547 100644
--- a/cargo-dist/tests/snapshots/install_path_cargo_home.snap
+++ b/cargo-dist/tests/snapshots/install_path_cargo_home.snap
@@ -723,6 +723,7 @@ class Axolotlsay < Formula
     pkgshare.install *leftover_contents unless leftover_contents.empty?
   end
 end
+
 ================ installer.ps1 ================
 # Licensed under the MIT license
 # <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
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 8c9c57a3..41d18006 100644
--- a/cargo-dist/tests/snapshots/install_path_env_no_subdir.snap
+++ b/cargo-dist/tests/snapshots/install_path_env_no_subdir.snap
@@ -706,6 +706,7 @@ class Axolotlsay < Formula
     pkgshare.install *leftover_contents unless leftover_contents.empty?
   end
 end
+
 ================ installer.ps1 ================
 # Licensed under the MIT license
 # <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
diff --git a/cargo-dist/tests/snapshots/install_path_env_subdir.snap b/cargo-dist/tests/snapshots/install_path_env_subdir.snap
index b4b7349f..b52015e9 100644
--- a/cargo-dist/tests/snapshots/install_path_env_subdir.snap
+++ b/cargo-dist/tests/snapshots/install_path_env_subdir.snap
@@ -706,6 +706,7 @@ class Axolotlsay < Formula
     pkgshare.install *leftover_contents unless leftover_contents.empty?
   end
 end
+
 ================ installer.ps1 ================
 # Licensed under the MIT license
 # <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
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 39c6ea39..b6f2f3d4 100644
--- a/cargo-dist/tests/snapshots/install_path_env_subdir_space.snap
+++ b/cargo-dist/tests/snapshots/install_path_env_subdir_space.snap
@@ -706,6 +706,7 @@ class Axolotlsay < Formula
     pkgshare.install *leftover_contents unless leftover_contents.empty?
   end
 end
+
 ================ installer.ps1 ================
 # Licensed under the MIT license
 # <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
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 f4c34c97..fd791841 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
@@ -706,6 +706,7 @@ class Axolotlsay < Formula
     pkgshare.install *leftover_contents unless leftover_contents.empty?
   end
 end
+
 ================ installer.ps1 ================
 # Licensed under the MIT license
 # <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
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 cd134b32..c16b6a1b 100644
--- a/cargo-dist/tests/snapshots/install_path_home_subdir_deeper.snap
+++ b/cargo-dist/tests/snapshots/install_path_home_subdir_deeper.snap
@@ -706,6 +706,7 @@ class Axolotlsay < Formula
     pkgshare.install *leftover_contents unless leftover_contents.empty?
   end
 end
+
 ================ installer.ps1 ================
 # Licensed under the MIT license
 # <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
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 69a0af59..e151c9cb 100644
--- a/cargo-dist/tests/snapshots/install_path_home_subdir_min.snap
+++ b/cargo-dist/tests/snapshots/install_path_home_subdir_min.snap
@@ -706,6 +706,7 @@ class Axolotlsay < Formula
     pkgshare.install *leftover_contents unless leftover_contents.empty?
   end
 end
+
 ================ installer.ps1 ================
 # Licensed under the MIT license
 # <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
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 4fcc3cf5..7aa56454 100644
--- a/cargo-dist/tests/snapshots/install_path_home_subdir_space.snap
+++ b/cargo-dist/tests/snapshots/install_path_home_subdir_space.snap
@@ -706,6 +706,7 @@ class Axolotlsay < Formula
     pkgshare.install *leftover_contents unless leftover_contents.empty?
   end
 end
+
 ================ installer.ps1 ================
 # Licensed under the MIT license
 # <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
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 6a094024..bb1faa21 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
@@ -706,6 +706,7 @@ class Axolotlsay < Formula
     pkgshare.install *leftover_contents unless leftover_contents.empty?
   end
 end
+
 ================ installer.ps1 ================
 # Licensed under the MIT license
 # <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
diff --git a/cargo-dist/tests/snapshots/manifest.snap b/cargo-dist/tests/snapshots/manifest.snap
index 1babeb04..d388fda0 100644
--- a/cargo-dist/tests/snapshots/manifest.snap
+++ b/cargo-dist/tests/snapshots/manifest.snap
@@ -228,7 +228,7 @@ stdout:
         "aarch64-apple-darwin",
         "x86_64-apple-darwin"
       ],
-      "install_hint": "brew install cargo-dist",
+      "install_hint": "brew install axodotdev/homebrew-tap/cargo-dist",
       "description": "Install prebuilt binaries via Homebrew"
     }
   }