Skip to content

Commit 316b0c2

Browse files
committed
Fix installer detection and prompt for prior deploys
Two fixes: 1. coexistence.sh: ccgs_has_opencode_prior now also checks for .opencode/agents/creative-director.md — recognizes prior deploys that lost their install-state.json or VERSION file 2. install.sh: safety prompt reads from stdin instead of /dev/tty — allows piped input (echo 'y' | bash install.sh ...) for non-interactive contexts like CI or agent-driven deploys
1 parent 042fd12 commit 316b0c2

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

.opencode/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ if [ -n "${target_arg:-}" ] && [ "$install_mode" = "opencode_clean" ]; then
6161
printf 'The installer will deploy alongside existing content.\n\n' >&2
6262
if [ "$dry_run" -eq 0 ]; then
6363
printf 'Continue? [y/N] ' >&2
64-
read -r response </dev/tty || response="n"
64+
read -r response || response="n"
6565
case "$response" in
6666
y|Y|yes|YES) ;;
6767
*) printf 'Aborted.\n'; exit 1 ;;

.opencode/lib/coexistence.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ ccgs_has_codex_ccgs() {
6565
ccgs_has_opencode_prior() {
6666
[ -f "${target_root:-$PWD}/.opencode/install-state.json" ] && return 0
6767
[ -f "${target_root:-$PWD}/.opencode/VERSION" ] && return 0
68+
[ -f "${target_root:-$PWD}/.opencode/agents/creative-director.md" ] && return 0
6869
return 1
6970
}
7071

0 commit comments

Comments
 (0)