Bradley Blyther
05/19/2026, 8:00 AM- name: Restore dependencies
run: |
bun install --frozen-lockfile
bun install --frozen-lockfile # Infisical fails to install in the first run
Otherwise I get this
/usr/bin/bash: line 1: infisical: command not found
error: script "infisical" exited with code 127
We have Infisical listed as a trusted dep, Please let me know if it is something I am doing wrong or missingPylon
05/19/2026, 4:11 PMbun handles the installation hooks.
Are you using the CLI in your app or just in CI? If not, could you you install it directly on the CI using bun install -g @infisical/cli and see if the behavior changes?
If this doesn't help, could you share more details?
1. Which step in CI fails with error: script "infisical" exited with code 127? Could you share the step code?
2. Do you have any installation hooks in package.json that rely on infisical being present?Bradley Blyther
05/20/2026, 8:58 AMInfisical isn't called on any install scripts, we are simply calling bunx turbo run build or dev, etc which calls infisical on each sub package scriptPylon
05/21/2026, 11:48 PM@infisical/cli to your trusted dependencies. Please let me know if this helps!Bradley Blyther
05/22/2026, 8:51 AMpackage.json file.
"trustedDependencies": [
"@infisical/cli"
]Pylon
05/22/2026, 7:39 PMtrustedDependencies setup is correct, so nothing's wrong on your end.
This is a timing issue. The @infisical/cli package downloads the actual binary in a lifecycle script, and Bun runs those in parallel. So bun install can finish and report success before that download has actually written the binary to disk. Turbo then runs a moment too early and hits the 127 error.
A cleaner way to handle it is to run the script explicitly. Drop the duplicate bun install and add this step right after your install:
- run: bun pm trust @infisical/cli
bun pm trust runs the lifecycle script synchronously and waits for it to finish, so the binary is definitely there before turbo runs.
Let me know if this helps!Bradley Blyther
05/26/2026, 10:43 AMbun pm trust @infisical/cli
error: 0 scripts ran. The following packages are already trusted, don't have scripts to run, or don't exist:
- @infisical/cli
and still get the following afterwards
/usr/bin/bash: line 1: infisical: command not found
error: script "infisical" exited with code 127Pylon
05/26/2026, 3:32 PMbun pm trust reports "0 scripts ran" is that it only runs lifecycle scripts for dependencies that are currently untrusted. Since you already have @infisical/cli in trustedDependencies, Bun considers the postinstall handled, so bun pm trust has nothing to do.
The fix I'd recommend is to stop relying on the postinstall entirely and install the CLI as its own blocking step before turbo runs. The npm package is just a wrapper around the same binary, so installing it directly is more reliable in CI:
- name: Install Infisical CLI
run: |
curl -1sLf '<https://artifacts-cli.infisical.com/setup.deb.sh>' | sudo -E bash
sudo apt-get update && sudo apt-get install -y infisical
infisical --version
The infisical --version line means the step fails fast if anything went wrong, instead of failing mysteriously later in the build.
If you'd prefer to keep it managed by bun install, you can make bun pm trust work by removing @infisical/cli from trustedDependencies so the script is genuinely blocked, then trust it explicitly right after install:
- run: bun install --frozen-lockfile
- run: bun pm trust @infisical/cli
With the package no longer pre-trusted, bun pm trust runs the postinstall synchronously and waits for it to finish before turbo runs.Bradley Blyther
05/27/2026, 8:26 AM