Skip to content

Conversation

@pcahyna
Copy link
Contributor

@pcahyna pcahyna commented Nov 10, 2025

Uses argv properly instead of concatenating all arguments in a single string and searching for the --config argument inside it.

Fixes also some other corner cases:

  • The "--config " string in the middle of another arguemnt is not interpereted as a --config argument anymore.
  • "--confg" argument is not accepted anymore (used to be an alias for --config).

Before:

  • did --help --conf "System roles/sconf.did"
Create at least a minimum config file /home/pcahyna/.did/System:
[general]
email = Name Surname <email@example.org>
 ERROR  Unable to read the config file '/home/pcahyna/.did/System'.
  • did --help --email "Samuel--conf <sconf@example.com>" --conf "System roles/sconf.did"
Create at least a minimum config file /home/pcahyna/.did/<sconf@example.com>:
[general]
email = Name Surname <email@example.org>
 ERROR  Unable to read the config file '/home/pcahyna/.did/<sconf@example.com>'.
  • did --help --confg "test/sconf.did"
    <help text>

After:

  • did --help --conf "System roles/sconf.did"
    <help text>
  • did --help --email "Samuel--conf <sconf@example.com>" --conf "System roles/sconf.did"
    <help text>
  • did --help --confg "test/sconf.did"
Create at least a minimum config file /home/pcahyna/.did/config:
[general]
email = Name Surname <email@example.org>
 ERROR  Unable to read the config file '/home/pcahyna/.did/config'.

Copy link
Collaborator

@sandrobonazzola sandrobonazzola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add also a test for this?

@pcahyna
Copy link
Contributor Author

pcahyna commented Nov 11, 2025

I can, but it will take me some time.

Uses argv properly instead of concatenating all arguments in a single
string and searching for the --config argument inside it.

Fixes also some other corner cases:
- The "--config " string in the middle of another arguemnt is not
  interpereted as a --config argument anymore.
- "--confg" argument is not accepted anymore (used to be an alias for
  --config).
@sandrobonazzola sandrobonazzola force-pushed the fix-whitespace-in-config branch from 12e9fb2 to 58c8db8 Compare December 19, 2025 09:20
@sandrobonazzola sandrobonazzola merged commit 4ebe494 into psss:main Dec 19, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants