Closed jrhorn424 closed 3 years ago
This probably doesn't work because homeshick
uses git clone
in the background, and git clone
throws errors. I'm not sure how to tackle this, or if it is even worth it.
This would certainly be expected behavior, homeshick
should delete the existing repository beforehand.
The non-idempotency of the deploy script has annoyed me for a while now.
The switches are only used on the link
command, but they certainly also make sense in track
, clone
and generate
commands.
I was thinking about this earlier today. Perhaps it should delete the clone, as you say, or homeshick clone
could check for an existing directory. In default mode, it could ask whether your intended to just do homeshick pull
, but with homeshick clone --force
could just delete and re-clone.
Another alternative would be to have homeshick clone --force
or another switch default to the pull behavior, and try cloning when pulling fails, but that isn't semantically as nice as the above suggestion.
Aside from dealing with an already existing repository, clone could also work with --force to add symlinks when in --batch mode. I might be missing something but it seems that --batch defaults to NO for symlinks. And --force can't override this to YES
Aside from dealing with an already existing repository, clone could also work with --force to add symlinks when in --batch mode. I might be missing something but it seems that --batch defaults to NO for symlinks. And --force can't override this to YES
That is easy to work around actually, just run homeshick --batch clone [repo] && homeshick link -f [castle]
Yeah that works, I was just confused since clone prompts to symlink but doesn’t accept —force. On Sat, Apr 21, 2018 at 10:44 Anders Ingemann notifications@github.com wrote:
Aside from dealing with an already existing repository, clone could also work with --force to add symlinks when in --batch mode. I might be missing something but it seems that --batch defaults to NO for symlinks. And --force can't override this to YES
That is easy to work around actually, just run homeshick --batch clone [repo] && homeshick link -f [castle]
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/andsens/homeshick/issues/49#issuecomment-383302300, or mute the thread https://github.com/notifications/unsubscribe-auth/AAK_3V0THgHq1eb6xfshJTAjFv2s5BlIks5tq0WzgaJpZM4BCC_k .
Use case: Automated installs (should be idempotent, right?)
Expected:
homeshick clone user/repo --force
should not return non-zero exit when files exist. Why?Actual:
Same probably goes for
--skip
, in retrospect.