harness: write claude configs to systemd RuntimeDirectory + chown ~/.claude on activation (#658 fixup)
This commit is contained in:
parent
113e64e481
commit
b8647cf7dc
6 changed files with 52 additions and 24 deletions
|
|
@ -136,8 +136,8 @@ impl TurnFiles {
|
|||
///
|
||||
/// Returns an error if the config file cannot be written.
|
||||
pub async fn write_mcp_config(socket: &Path) -> Result<PathBuf> {
|
||||
let parent = socket.parent().unwrap_or_else(|| Path::new("/run/hive"));
|
||||
tokio::fs::create_dir_all(parent).await.ok();
|
||||
let parent = crate::paths::config_dir();
|
||||
tokio::fs::create_dir_all(&parent).await.ok();
|
||||
let path = parent.join("claude-mcp-config.json");
|
||||
let exe = std::env::current_exe()
|
||||
.ok()
|
||||
|
|
@ -155,9 +155,9 @@ pub async fn write_mcp_config(socket: &Path) -> Result<PathBuf> {
|
|||
/// # Errors
|
||||
///
|
||||
/// Returns an error if the settings file cannot be written.
|
||||
pub async fn write_settings(socket: &Path) -> Result<PathBuf> {
|
||||
let parent = socket.parent().unwrap_or_else(|| Path::new("/run/hive"));
|
||||
tokio::fs::create_dir_all(parent).await.ok();
|
||||
pub async fn write_settings(_socket: &Path) -> Result<PathBuf> {
|
||||
let parent = crate::paths::config_dir();
|
||||
tokio::fs::create_dir_all(&parent).await.ok();
|
||||
let path = parent.join("claude-settings.json");
|
||||
// #555: source-of-truth is `$HIVE_ASSETS_DIR/prompts/claude-settings.json`;
|
||||
// copy through the per-agent runtime dir so claude reads it from the
|
||||
|
|
|
|||
Loading…
Reference in a new issue