did
did copied to clipboard
Fix parsing of --config argument with whitespace
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'.
did --help --email "Samuel--conf <[email protected]>" --conf "System roles/sconf.did"
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'.
I can, but it will take me some time.