did icon indicating copy to clipboard operation
did copied to clipboard

Fix parsing of --config argument with whitespace

Open pcahyna opened this issue 1 month ago • 1 comments

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 protected]>
 ERROR  Unable to read the config file '/home/pcahyna/.did/System'.
Create at least a minimum config file /home/pcahyna/.did/<[email protected]>:
[general]
email = Name Surname <[email protected]>
 ERROR  Unable to read the config file '/home/pcahyna/.did/<[email protected]>'.
  • did --help --confg "test/sconf.did" <help text>

After:

  • did --help --conf "System roles/sconf.did" <help text>
  • did --help --email "Samuel--conf <[email protected]>" --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 protected]>
 ERROR  Unable to read the config file '/home/pcahyna/.did/config'.

pcahyna avatar Nov 10 '25 18:11 pcahyna

I can, but it will take me some time.

pcahyna avatar Nov 11 '25 14:11 pcahyna