Is your feature request related to a problem? Please describe.
Often, the target file already exists on a system that was just set up. For example, ~/.bashrc already exists which requires dotter deploy --force. Though I would prefer not to apply force to all targets.
Describe the solution you'd like
For this reason, a forced overwrite should be configurable per target.
It's already possible to configure the type per target:
[bash.files]
bashrc = { target = "~/.bashrc", type = "symbolic" }
It should also be possible to overwrite the existing file, which could look like this:
[bash.files]
bashrc = { target = "~/.bashrc", type = "symbolic", overwrite = "force" }
An alternative configuration is:
[bash.files]
bashrc = { target = "~/.bashrc", type = "symbolic_overwrite" }
Describe alternatives you've considered
An alternative to achieve the same is to run dotter deploy twice. In particular:
- Create all targets as symbolic links:
dotter deploy
- Now also replace existing targets which failed in the first step:
dotter deploy --force
Happy to contribute if this feature makes sense to you.
Is your feature request related to a problem? Please describe.
Often, the target file already exists on a system that was just set up. For example,
~/.bashrcalready exists which requiresdotter deploy --force. Though I would prefer not to applyforceto all targets.Describe the solution you'd like
For this reason, a forced overwrite should be configurable per target.
It's already possible to configure the
typeper target:It should also be possible to overwrite the existing file, which could look like this:
An alternative configuration is:
Describe alternatives you've considered
An alternative to achieve the same is to run
dotter deploytwice. In particular:dotter deploydotter deploy --forceHappy to contribute if this feature makes sense to you.