Skip to content

Commit 0be59f6

Browse files
committed
Update ArgumentsManager.cs
1 parent 513a407 commit 0be59f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ProgramArgumentsManager/ArgumentsManager.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,15 @@ public void Parse(string[] args)
5757
}
5858
}
5959

60-
foreach (Argument.ArgValues argValues in _options.Values.Where(argValues => !argValues.Specified))
60+
foreach (Argument.ArgValues argValues in _options.Values.Where(argValues => !argValues.Specified || !argValues.Values.Any()))
6161
argValues.Values = null;
6262
}
6363

6464
public bool IsSpecified(string arg) => _options[arg].Specified;
6565

6666
public List<string> GetValues(string arg) => _options[arg].Values;
6767

68-
public string GetValue(string arg) => string.Join(" ", _options[arg]);
68+
public string GetValue(string arg) => _options[arg].Values is null ? null : string.Join(" ", _options[arg].Values);
6969

7070
private class Argument
7171
{

0 commit comments

Comments
 (0)