fix: destroy --base -y fails with 'target is required' (issue #183) #184

Merged
shoko merged 1 commits from fix/issue-183-destroy-base-requires-target into main 2026-04-06 06:16:30 +02:00
Owner

Summary

Fixed kugetsu destroy --base -y which was failing with "Error: target is required" in v0.2.9.

Bug

The cmd_destroy() function had code that set target="" when target="--base", causing the early validation check if [ -z "$target" ] to exit before reaching the actual --base handling.

Fix

Removed the erroneous early assignment (lines 482-484) that was clearing the target variable before the --base case could be handled.

Changes

  • kugetsu-session.sh: Removed 4 lines that incorrectly cleared target when it was "--base"
## Summary Fixed `kugetsu destroy --base -y` which was failing with "Error: target is required" in v0.2.9. ## Bug The `cmd_destroy()` function had code that set `target=""` when `target="--base"`, causing the early validation check `if [ -z "$target" ]` to exit before reaching the actual `--base` handling. ## Fix Removed the erroneous early assignment (lines 482-484) that was clearing the target variable before the `--base` case could be handled. ## Changes - `kugetsu-session.sh`: Removed 4 lines that incorrectly cleared `target` when it was `"--base"`
shoko added 1 commit 2026-04-06 06:14:18 +02:00
Removed erroneous code that set target="" when target="--base".
This caused the early exit at 'if [ -z "$target" ]' to trigger
before reaching the actual --base handling at line 517.
han approved these changes 2026-04-06 06:16:01 +02:00
han left a comment
First-time contributor

lgtm

lgtm
shoko merged commit 3a2095861f into main 2026-04-06 06:16:30 +02:00
Sign in to join this conversation.