fix: set force=true on config home.file to prevent clobber errors#51
Open
ioitiki wants to merge 3 commits intoopenclaw:mainfrom
Open
fix: set force=true on config home.file to prevent clobber errors#51ioitiki wants to merge 3 commits intoopenclaw:mainfrom
ioitiki wants to merge 3 commits intoopenclaw:mainfrom
Conversation
The gateway's plugin auto-enable writes to openclaw.json on startup, replacing the nix store symlink with a regular file. This causes subsequent `home-manager switch` to fail with "would be clobbered". Setting force=true on the home.file entry allows home-manager to overwrite the file unconditionally, which is safe since the config is declaratively managed and the gateway only reads it at runtime. Fixes openclaw#50 Co-Authored-By: Claude Opus 4.6 <[email protected]>
4 tasks
Author
|
_The The check script's fallback scan of update: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
force = trueon thehome.fileentry foropenclaw.jsonso home-manager overwrites it unconditionallyhome-manager switchfailing with "Existing file would be clobbered" after the gateway replaces the nix store symlink with a regular fileRoot cause
The gateway's
applyPluginAutoEnableruns on startup and callswriteConfigFile()even whenOPENCLAW_NIX_MODE=1is set. This replaces the read-only nix store symlink with a regular file. On the nexthome-manager switch, thecheckLinkTargetsstep fails because it refuses to overwrite an unmanaged regular file.The
isNixModeguard exists for legacy config migration but is missing from the plugin auto-enable code path. This PR works around that by telling home-manager it's safe to overwrite.Test plan
openclaw-config-validity,openclaw-hm-activation) are unaffected — they access.text, notforcehome-manager switchafter gateway has replaced the symlink — should succeed without-b backupFixes #50
🤖 Generated with Claude Code