quaint-telephone-89068
10/26/2022, 9:47 PMFailure: exec: "diff": cannot run executable found relative to current directory
From the Go docs:
To avoid those security problems, as of Go 1.19, this package will not resolve a program using an implicit or explicit path entry relative to the current directory.
buf format
needs diff
in order to run, and our buf backend uses BinaryShims
to get diff
into the sandbox. Taking a look at BinaryShims.bin_directory
, which we add to PATH
before running buf
, it is very much a relative path.
The easy fix would be to make BinaryShims.bin_directory
an absolute path instead, but we don't know about the sandbox and its path at the time bin_directory
is set. Instead we can patch the sandbox similar to the `GoSdkProcess` rule to make PATH
absolute.
pantsbuild/pantsuser
10/27/2022, 11:09 AM