Skip to content

Conversation

@peteski22
Copy link
Contributor

@peteski22 peteski22 commented Sep 25, 2025

Summary

This PR addresses a config export bug: Positional arguments were being silently skipped during mcpd config export

The exportRuntimeArgs function was skipping all positional (non-flag) arguments with a continue statement, causing them to be missing from exported environment files.

Refactored exportRuntimeArgs to properly handle positional arguments
that were previously being skipped. Split logic into clean helper
functions following functional programming principles.

- Add partitionArgs() to separate positional and flag arguments
- Add exportPositionalArgs() to handle ARG_1, ARG_2, etc.
- Add exportFlagArgs() for flag argument processing
- Add comprehensive test coverage for all scenarios
@peteski22 peteski22 force-pushed the peteski22/cmd/fix-export-pos-args branch from 2492281 to c5174cf Compare September 26, 2025 08:45
@peteski22 peteski22 changed the title Fix config export for positional arguments and daemon signal handling race condition Fix config export for positional arguments Sep 26, 2025
@peteski22 peteski22 added bug Something isn't working cli labels Sep 26, 2025
@peteski22 peteski22 merged commit 4444354 into main Oct 7, 2025
2 checks passed
@peteski22 peteski22 deleted the peteski22/cmd/fix-export-pos-args branch October 7, 2025 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working cli

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants