-
Notifications
You must be signed in to change notification settings - Fork 36
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
feat(filebrowser): check if already installed #334
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
a67b482
add check if filebrowser is installes
IamTaoChen 98e8028
double $$
IamTaoChen 32588f2
run './update-version.sh'
IamTaoChen a2e39dc
Align script with test script(test.ts)
IamTaoChen 5733928
copy from https://github.com/coder/modules/blob/atif/qol-improvments…
IamTaoChen 718e75b
Merge branch 'main' into main
matifali File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(No action, just commentary.)
This is nice, but unfortunately it's rare that users will benefit since it's usually installed to
/usr/local/bin
. For containers it's rarely persisted.It'd be cool if we could store this in
$CODER_SCRIPT_BIN_DIR
instead. Usually this is within/tmp
but it's possible to change by starting the coder agent withCODER_AGENT_SCRIPT_DATA_DIR=/path/to/persistent/dir
.This is something to consider for all modules, should we track this in a new issue @matifali?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For air-gapped scenarios where the image already has it installed this is beneficial.
I am a bit confused about $CODER_SCRIPT_BIN_DIR and $CODER_AGENT_SCRIPT_DATA_DIR. Do we have them already and how are the used? Or are you proposing this new concept.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏻
We have them.
Let's say you run the agent this way:
coder agent --script-data-dir=/home/coder/.local/coder-script
Now all coder scripts will be executed with the following environment variables:
And the coder agent will automatically add
/home/coder/.local/coder-script/bin
to thePATH
.Even without specifying the script dir, a default will be used, you can verify this in your workspace:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is super useful and we should start using it in our modules.