fix: mock-forgejo path parsing bug + non-fatal cron in smoke-init (#586)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/pr/smoke-init Pipeline was successful

- Fix off-by-one in mock admin/users/{username}/repos path extraction
  (parts[4] was 'users', not the username — should be parts[5])
- Change _install_cron_impl to return 1 instead of exit 1 when crontab
  is missing, so cron failure doesn't abort entire init

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Claude 2026-04-10 15:08:43 +00:00
parent d190296af1
commit 3405879d8b
3 changed files with 5 additions and 34 deletions

View file

@ -45,9 +45,9 @@ _install_cron_impl() {
# 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 "Warning: crontab not found (required for bare-metal scheduling)" >&2
echo " Install: apt install cron / brew install cron" >&2
exit 1
return 1
fi
# Use absolute path for the TOML in cron entries