Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/GitVersionExe.Tests/ArgumentParserTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -291,4 +291,12 @@ public void log_path_can_contain_forward_slash()
var arguments = ArgumentParser.ParseArguments("-l /some/path");
arguments.LogFilePath.ShouldBe("/some/path");
}

[Test]
public void boolean_argument_handling()
{
var arguments = ArgumentParser.ParseArguments("/nofetch /updateassemblyinfo true");
arguments.NoFetch.ShouldBe(true);
arguments.UpdateAssemblyInfo.ShouldBe(true);
}
}
2 changes: 1 addition & 1 deletion src/GitVersionExe/ArgumentParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ static bool IsBooleanArgument(string switchName)
"nofetch"
};

return booleanArguments.Contains(switchName, StringComparer.OrdinalIgnoreCase);
return booleanArguments.Contains(switchName.Substring(1), StringComparer.OrdinalIgnoreCase);
}
}
}