From bc2df1a2c79bb87612b7e7722538ab7698525019 Mon Sep 17 00:00:00 2001 From: openhands Date: Tue, 24 Mar 2026 22:40:35 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20disinto=20init=20fails=20on=20minimal=20?= =?UTF-8?q?Debian=20=E2=80=94=20crontab=20command=20not=20found=20(#638)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In compose mode, skip host cron installation entirely since the agents container runs cron internally via entrypoint.sh. In bare mode, check for crontab before attempting to install entries and produce a clear error with install instructions if missing. Co-Authored-By: Claude Opus 4.6 (1M context) --- bin/disinto | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/bin/disinto b/bin/disinto index 56619d1..8d314a7 100755 --- a/bin/disinto +++ b/bin/disinto @@ -732,7 +732,21 @@ EOF # Generate and optionally install cron entries for the project agents. install_cron() { - local name="$1" toml="$2" auto_yes="$3" + local name="$1" toml="$2" auto_yes="$3" bare="${4:-false}" + + # In compose mode, skip host cron — the agents container runs cron internally + if [ "$bare" = false ]; then + echo "" + echo "Cron: skipped (agents container handles scheduling in compose mode)" + return + fi + + # Bare mode: crontab is required on the host + if ! command -v crontab &>/dev/null; then + echo "Error: crontab not found (required for bare-metal mode)" >&2 + echo " Install: apt install cron / brew install cron" >&2 + exit 1 + fi # Use absolute path for the TOML in cron entries local abs_toml @@ -1058,7 +1072,7 @@ p.write_text(text) generate_vision "$repo_root" "$project_name" # Install cron jobs - install_cron "$project_name" "$toml_path" "$auto_yes" + install_cron "$project_name" "$toml_path" "$auto_yes" "$bare" # Set up mirror remotes if [mirrors] configured in TOML source "${FACTORY_ROOT}/lib/load-project.sh" "$toml_path"