fix: wait for opencode to read msg file before removing it
This commit is contained in:
@@ -382,6 +382,7 @@ cmd_start() {
|
||||
local msg_file="$worktree_path/.kugetsu-msg.txt"
|
||||
printf '%s' "$dev_message" > "$msg_file"
|
||||
nohup sh -c "GITEA_TOKEN='${GITEA_TOKEN:-}' opencode run '@$msg_file' --session '$new_session_id'" >> "$LOGS_DIR/dev-$sanitized_id.log" 2>&1 &
|
||||
sleep 0.5
|
||||
rm -f "$msg_file"
|
||||
|
||||
echo "Session started for '$issue_ref': $new_session_id"
|
||||
@@ -449,6 +450,7 @@ cmd_continue() {
|
||||
local msg_file="$worktree_path/.kugetsu-msg.txt"
|
||||
printf '%s' "$message" > "$msg_file"
|
||||
nohup sh -c "GITEA_TOKEN='${GITEA_TOKEN:-}' opencode run '@$msg_file' --session '$opencode_session_id'" >> "$LOGS_DIR/dev-$sanitized_id.log" 2>&1 &
|
||||
sleep 0.5
|
||||
rm -f "$msg_file"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user