Gankra / cargo-mommy

Mommy's here to support you when running cargo~
https://faultlore.com/cargo-mommy/
Apache License 2.0
726 stars 49 forks source link

mommy should let you specify the directory for "i mean" copies #53

Open lilyball opened 9 months ago

lilyball commented 9 months ago

mommy tries to copy itself to the same directory it's already in when using "i mean", but this won't work when it doesn't have permission to write to that directory (most notably, when installed via Nix). I should be able to tell mommy what directory to use for aliases (e.g. with an env var).

Also I noticed mommy copies her binary instead of symlinking. That seems like it will cause trouble when updating mommy.

Gankra commented 9 months ago

Not sure how we'd express the paths properly -- at the end of the day you can just use cp, right?

The copy behaviour is however intentional, as symlinking is cursed on windows.

lilyball commented 9 months ago

Copy on windows, symlink elsewhere then?

And yeah I can cp or symlink myself, but that means I don't get to type cargo mommy i mean mommy i mean mommy i mean mistress.

I was thinking it would just be something like CARGO_MOMMY_I_MEAN_DIR=$HOME/bin.