feat(mcp): only set variables for set flags by keegancsmith · Pull Request #1234 · sourcegraph/src-cli

@keegancsmith

Previously we had code which tried to detect nil values. But for example
if a flag is an integer that wouldn't work. Instead we use a more robust
approach of only setting variables if the flag was passed in as an
argument.

Test Plan: this command actually returns results now. Previously it
wouldn't since it would have limit set to 0.

  go run ./cmd/src -v mcp list-repos -query 'cloud'

burmudar

@keegancsmith