Philosophical quandary: I’m using `/bin/cat` as p...
# development
a
Philosophical quandary: I’m using 
/bin/cat
as part of a build step. It’s a POSIX utility in its POSIX location, and I’m using POSIX-compliant args (i.e. nothing implementation-specific) for it. Should I use a 
BinaryPath
 request to find that (and be consistent with the rest of Pants), or am I OK directly calling 
/bin/cat
and saving an extra step in the graph?
h
I think as long as you restrict yourself to POSIX-compliant args, that seems sensible. You get into trouble when using newer features and the user wants
/usr/bin/cat
used over
/bin/cat
etc. This has happened to us with
zip
,
unzip
, and
tar
commands That restriction should be documented in the source code, ideally with a link to the relevant docs
f
I vote to not worry about it now. It’s easily refactored to use
BinaryPath
should there be a user who has
cat
in a non-standard location.
a
Great
f
and if it is a performance problem, we can always write an engine intrinsic to concatenate 2+ files together
👍 1
a
in this case, we need to postprocess the output of
cat
anyway, so filesystem operations involved in sandbox operations would probably eclipse the savings of using an engine intrinsic
👍 1