Skip to content

feat: support locally provided CLI binaries via binaryDestination#286

Open
fioan89 wants to merge 11 commits intomainfrom
impl-support-for-local-cli
Open

feat: support locally provided CLI binaries via binaryDestination#286
fioan89 wants to merge 11 commits intomainfrom
impl-support-for-local-cli

Conversation

@fioan89
Copy link
Copy Markdown
Collaborator

@fioan89 fioan89 commented Mar 23, 2026

Reimplemented binPath to support three modes:

  • default data directory
  • absolute path to a pre-existing local CLI (when downloads are disabled)
  • and base directory with host-specific subdirectory (when downloads are enabled)

This modes are controlled by the Binary directory setting now renamed to Binary destination and the enable downloads setting.

fioan89 added 3 commits March 23, 2026 23:50
Reimplemented `binPath` to support three modes:
- default data directory
- absolute path to a pre-existing local CLI (when downloads are disabled)
- and base directory with host-specific subdirectory (when downloads are enabled)

This modes are controlled by the Binary directory setting now renamed to
Binary destination and the enable downloads setting.

- resolves #285
That tests the fallback configuration from binaryDestination
to the deprecated binaryDirectory.
In addition, the existing tests were updated as they now have to
take into account that enableDownloads option affects the output
of binPath API.
@fioan89 fioan89 requested review from code-asher and matifali March 24, 2026 20:26
Windows needs special handling because we can't mock
the exe binary as a bash script like we do on Linux/Mac.
In addition, there were a couple of unix paths hardcoded
in some of the tests.
fioan89 added 7 commits March 25, 2026 22:04
Windows needs special handling because we can't mock
the exe binary as a bash script like we do on Linux/Mac.
In addition, there were a couple of unix paths hardcoded
in some of the tests.
binaryDestination can now take a path to an executable or a path to a download directory.
In order to reflect the new behavior regarding CLI resolution in
general and the binary destination in particular.
Adds a chapter describing the behavior of binaryDestination,
dataDir, enableDownloads, and enableBinaryDirFallback, and
explains how these settings interact and work together.
Refactored some of the existing tests into a new
battery with a bunch additional tests to cover the complex
and intertwined way of working for binaryDestination, enableDownloads,
dataDir and enableFallback settings in the way CLI is resolved.
@matifali matifali removed their request for review March 28, 2026 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

If coder is installed via winget, local binary fallback fails because plugin expects release artifact name instead of installed executable name

2 participants