You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.proto needs to be the suffix or buf format --path doesn't actually read it/run
dump the stdin capture to the tmpfile location
create a trap so when bash exits it'll clean up the tmpfile
this also helps if buf crashes or doesn't exist
cd into /tmp because buf wants to be relative to the file
run buf pointing at the single file with --path
I imagine this should work on Mac but it certainly works for me on Linux.
I think the mktemp usage could be cleaned up a bit but I wanted to avoid using too many features in-case they're GNU mktemp specific.
Maybe there should be a check that $TMPFILE gets written to just to double check the right file is being targeted for deletion.
The text was updated successfully, but these errors were encountered:
Check for existing issues
Misc notes
It'd be nice, in addition to having buf lsp support (#1928) to also have buf formatter support.
There are a few upstream blockers to this
For now you can hack in support for buf formatting like so (use at your own risk):
It executes into
bash
with a script that:/tmp
-u
for dryrun because we need to add a suffix.proto
needs to be the suffix orbuf format --path
doesn't actually read it/runbash
exits it'll clean up the tmpfilebuf
crashes or doesn't existcd
into/tmp
becausebuf
wants to be relative to the filebuf
pointing at the single file with--path
I imagine this should work on Mac but it certainly works for me on Linux.
I think the mktemp usage could be cleaned up a bit but I wanted to avoid using too many features in-case they're GNU mktemp specific.
Maybe there should be a check that
$TMPFILE
gets written to just to double check the right file is being targeted for deletion.The text was updated successfully, but these errors were encountered: