<#17363 Buf 1.9 isn't compatible with the buf back...
# github-notifications
q
#17363 Buf 1.9 isn't compatible with the buf backend Issue created by jyggen Running Buf 1.9 results in the following error during `pants fmt`:
Copy code
Failure: 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/pants
u