service_complete fails to parse: else on new line after } in packages.nu #147
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_skills#147
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom
Running
service_complete(with no flags) errors out at parse time:Root cause
Nushell requires
else/else ifto be on the same line as the previous block's closing}. Intools/modules/services/packages.nuat theservice_completefunction, the Phase 1 (if $core { ... } else { ... }) inner chains were written with}andelsesplit across lines:The parser interprets the bare
elseon the next line as an unknown command, so the entireservice_completedefinition fails to load — meaning the command is unusable for any flag combination, not just the no-flag case.The rest of
packages.nu(lines 62-68 inservice_install_all, lines 196-219 inservice_complete's Phase 2, lines 254-260 in the WASM phase) uses correctly-formed chains, so this is the only spot that's broken.Introduced in
Commit
6d1f725— feat(skills): service_os wasm_build + --wasm flag on service_complete (#128). The--wasmflag refactor reshaped this Phase 1 block from a single-liner into the multi-line form without joining}andelse.Reproduction
Any invocation of
service_complete(with or without flags) on a current Nushell:Fails with the parse error above. Also blocks
service_complete --core,--update,--reset,--wasm, etc.Fix
Collapse each branch onto a single line, matching the style used at lines 196-219:
Verified locally on
kristof6:nu -c 'use packages.nu *; help service_complete'parses cleanly after the fix.PR to follow.
elsewith}on service_complete Phase 1 chains #148Fix is up in #148 (branch
fix/service-complete-else-147, commit0501b13).Diff (single-file, 2 insertions / 6 deletions in
tools/modules/services/packages.nu):Verified locally on
kristof6—service_completenow parses and loads. Ready for review.