zap
zap copied to clipboard
use --directory-prefix=
use --directory-prefix= in case the directory path doesn't exist
This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.
🔍 Inspect: https://vercel.com/srevinsaju/zap/HReZgiUejJTp2FEmcNBj5EZLyENR
✅ Preview: https://zap-git-fork-goddard-patch-1-srevinsaju.vercel.app
But... --directory-prefix
just creates the directory, right? Here, we are also overriding the file name.
Right now.. if this command is executed by a user:
-
~/.local/bin/zap
directory will be created - The
zap-amd64
file will be placed in~/.local/bin/zap/.
, so the net resulting path of the binary would be~/.local/bin/zap/zap-amd64
. However, most$PATH
definitions on linux only adds~/.local/bin
to$PATH
, and that means, the user won't be able to invokezap
using its endpoint,zap
right? and even if~/.local/bin/zap/.
was added to$PATH
, user would have to usezap-amd64
to invokezap
instead of justzap
.
I added a commit https://github.com/srevinsaju/zap/commit/279370c92e8beda67e14841c5a7e8c94eeb51d38 to make it more intuitive. Now it additionally, creates the directories. Let me know if you have a better solution :smile:
yeah that definitely works. I just didn't want to make it multiple commands.
Also I think the instructions tell people to run command zap, but the binary downloaded is zap-amd64. So it either needs to add some kind of alias, or something.
Another problem is that the binary folder isn't actually in the $PATH on my machine.