https://pantsbuild.org/ logo
#general
Title
# general
c

curved-farmer-66180

03/03/2023, 10:39 PM
Hi everyone, I wanted to share with you my new tool, linear-cli. It's designed to help me quickly create a GitHub branch by pulling the issue name from Linear, a product management app similar to Jira. I used pants fmt, lint, mypy and pex to execute the code. If you're interested in checking it out, you can find it here: https://github.com/szto/linear-cli One issue I encountered was with executing pex globally. The current method I used felt a bit clunky. If anyone has any suggestions for a better way to execute pex globally, I would greatly appreciate your input. Thanks!
e

enough-analyst-54434

03/03/2023, 11:14 PM
What do you mean by execute a PEX globally? You mean treating it like any other binary and just putting it somewhere on your
PATH
?
Copy code
$ pex cowsay -c cowsay -o ~/bin/cowsay
$ which cowsay
/home/jsirois/bin/cowsay
$ cowsay 'Like this?'
  __________
| Like this? |
  ==========
          \
           \
             ^__^
             (oo)\_______
             (__)\       )\/\
                 ||----w |
                 ||     ||
Copy code
$ cd /tmp
$ cowsay 'Even here.'
  __________
| Even here. |
  ==========
          \
           \
             ^__^
             (oo)\_______
             (__)\       )\/\
                 ||----w |
                 ||     ||
c

curved-farmer-66180

03/03/2023, 11:47 PM
Aha. I got it! Does it without .pex? @enough-analyst-54434
e

enough-analyst-54434

03/03/2023, 11:48 PM
The .pex extension is just a convention. The file name does not matter (on Unix).
c

curved-farmer-66180

03/04/2023, 12:01 AM
Copy code
/usr/local/bin/linear
it worked now! Thanks @enough-analyst-54434
6 Views