feat: add duo-cli path override

Description

This MR is needed as a part of implementing gitlab-org/editor-extensions/gitlab-lsp#2096 (closed)

The idea is to make glab accept a path to duo-cli binary as an env var. Then in LSP the glab will run with this env var set to point it to the local binary which would enable local development loop in an environment as close to what users will be working with as possible.

Related LS MR: gitlab-org/editor-extensions/gitlab-lsp!3051 (merged)

Part of [CLI]: Document local development workflow for ... (gitlab-org/editor-extensions/gitlab-lsp#2096 - closed)

How has this been tested?

# Build
  make build

  # Run with a real local duo-cli binary
  GLAB_DUO_CLI_PATH=/path/to/your/duo-cli ./bin/glab duo cli

  # Or use any executable to verify the bypass logic (e.g. /bin/echo)
  GLAB_DUO_CLI_PATH=/bin/echo ./bin/glab duo cli hello world

Screenshots (if appropriate):

Edited by Tomas Vik

Merge request reports

Loading