heya :wave: Using pants 2.16, I'm seeing different...
# general
b
heya ๐Ÿ‘‹ Using pants 2.16, I'm seeing different behavior when running a script using
pants run
and when running it from a pex_binary. Specifically, I create a file using a shell_command,wrap it as a resource and happily use it in my script (with
pants run
). I see that the resource is included in the PEX file, but at the source root, not at the module (and therefore the script fails). Any pointers to a solution would be much appreciated ๐Ÿ™
r
Yeah so I think resource includes it at source root by default. You can move it to the desired location using relocated_files
b
hey @refined-addition-53644 thanks for the reply. relocated_files are only used with files targets as far as I can see in the docs (here I'm using resources). The resource is at the right spot when using
pants run
(not at the source root but in the package) so it's confusing that it's different within the pex file
hm, I was wrong; the resource does land at the same place in both cases, however the rest of the code is at a different location within the PEX file so the resource cannot be found.
this ๐Ÿงต is probably relevant