Skip to content

Allow configuring the source and destination of the Coder binary #103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bashscr opened this issue May 31, 2023 · 3 comments · Fixed by #122
Closed

Allow configuring the source and destination of the Coder binary #103

bashscr opened this issue May 31, 2023 · 3 comments · Fixed by #122
Assignees

Comments

@bashscr
Copy link

bashscr commented May 31, 2023

Hey, thank you for taking your time to read this.

Due to security policies in place, we are having issues using this extension without getting exceptions passed. It appears the fetchBinary() method in storage.ts is calling getBinaryCachePath() which uses path.join(this.globalStorageUri.fsPath, "bin") that returns %APPDATA%\Code\User\globalStorage\coder.coder-remote\bin\. Is it possible to either be able to choose where this bin gets stored/checked, or possibly update the checkBinaryExists() to check for system/user environment variables to see if the Coder CLI is already in the PATH? This would alleviate a lot of headaches if we could either choose the path to store the bin folder/file or be able to check to see if we already have a folder specified in our environment variables for the Coder CLI. No issues if the extension needs to update the Coder CLI in the environment variable PATH.

Please let me know if you have any thoughts/potential workarounds, thank you very much!

@code-asher
Copy link
Member

code-asher commented Jun 2, 2023

I was just about to create this issue but saw it already exists!

In the JetBrains plugin we added a setting that lets you configure the path of the binary so we should do the same here.

One use case seems to be configuring that to be some restricted location like in Program Files so when the binary is out of date and the plugin wants to download a new version but cannot write to the provided directory we added two options:

  • Disable the version check, always use the provided binary
  • Fall back to the default, writable location

Edit to mention I like the PATH idea too.

@code-asher code-asher changed the title Coder Bin Path Allow configuring the location of the Coder binary Jun 2, 2023
@code-asher
Copy link
Member

One other thing, for some folks being able to specify the download source can also fix their problem because they can sign the binaries. So to match the JetBrains plugin we might also want to allow configuring where the binary is downloaded from (for example from an Artifactory URL).

@code-asher code-asher changed the title Allow configuring the location of the Coder binary Allow configuring the source and destination of the Coder binary Jun 2, 2023
@kylecarbs
Copy link
Member

@bashscr it's always in the same path, so is the problem that a new binary is downloaded each time?

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 a pull request may close this issue.

4 participants