Merge pull request #15 from aarmea/u/aarmea/fix/no-clobber-config

Don't clober user configs on install
This commit is contained in:
Albert Armea 2026-01-01 23:20:24 -05:00 committed by GitHub
commit 3453e656a5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -159,12 +159,16 @@ install_config() {
maybe_sudo chown "$user:$user" "$user_config_dir"
maybe_sudo chmod 0755 "$user_config_dir"
# Check if config already exists
if maybe_sudo test -f "$dst_config"; then
warn "Config file already exists at $dst_config, skipping"
else
# Copy config file
maybe_sudo cp "$source_config" "$dst_config"
maybe_sudo chown "$user:$user" "$dst_config"
maybe_sudo chmod 0644 "$dst_config"
success "Installed user configuration for $user"
fi
}
# Install everything