fix: resolve install failures for tuckr, spectral, and bats helpers - #4
Merged
Conversation
The smoke-test step runs from /tmp/proto-smoke (no plugins/ dir), so the relative plugins/$id.toml lookup always failed — plugin_file stayed empty, the no-bin branch never fired, and proto bin bats-assert blew up. Fix: derive REPO_ROOT from the script's own path via $0 so the plugin file lookup works regardless of cwd, both in CI and locally. Also switch from positional-args-only to accept $TARGETS env var as fallback so the CI env: block works without dirty coupling — args win when provided, env var is the fallback, all-plugins is the last resort."
Proto auto-renames the downloaded binary to the tool name. The explicit
exe-path = "spectral-linux-{arch}" overrode that rename and pointed to
a filename that no longer exists, causing proto bin to fail with
missing_executable. no-unpack is also the wrong key; unpack = false is
the correct schema field (matching sops, dasel pattern).
The spectral bug was caused by following the old 'bare binary' example which said to set exe-path. Proto auto-renames a bare binary to the tool name after download, so exe-path must be omitted. unpack = false is also the correct field (not no-unpack = true which is silently ignored).
Root-level no-bin is not a valid Schema field and is silently ignored, so proto's linker still attempted symlinks and warned about missing executables. InstallSchema.no_bin is the correct location.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes four plugins that were failing during
smoke-installin CI.tuckr
exe-pathfor all platforms — proto could not find the binary after download because no path was configuredaarch64to[install.arch]mapping[platform.macos]sectionspectral
no-unpack = true— spectral ships as a single binary, not an archive, so proto was trying to unpack a file that needed no unpacking, leaving the binary unresolvableexe-pathalready correctly uses{arch}template which resolves to the downloaded filenamebats-file, bats-support, bats-assert
no-bin = trueto all three — these are shell libraries sourced viaBATS_LIB_PATH, not executables. Proto was warning on every install that it could not create a symlink because there is no binary to link. They still install correctly; bats discovers them through the proto tools directory.