fix: Handle all firecrest FS types#1124
Draft
sambuc wants to merge 4 commits into
Draft
Conversation
Simplify the logic, as we only want to handle specifically the "Users" fs type for now. Also add a check on the length of secretPath and add it only if the string is not empty.
157cd43 to
0e81035
Compare
leafty
reviewed
May 21, 2026
| if home != nil { | ||
| mounts = append(mounts, fmt.Sprintf("%s:/home%s:ro", home.Path, home.Path)) | ||
| // Add the secrets mount | ||
| if len(secretsPath) > 0 { |
Member
There was a problem hiding this comment.
Effective go:
Suggested change
| if len(secretsPath) > 0 { | |
| if secretsPath != "" { |
leafty
reviewed
May 21, 2026
| home = &fs | ||
| // TODO: Try to mount home at its location (need to handle ~/.bashrc) | ||
| // TODO: Alternatively, copy the contents in the container | ||
| mounts = append(mounts, fmt.Sprintf("%s/${USER}:/home%s/${USER}:ro", fs.Path, fs.Path)) |
Member
There was a problem hiding this comment.
Please don't interpolate ${USER}. This is potentially breaking.
Suggested change
| mounts = append(mounts, fmt.Sprintf("%s/${USER}:/home%s/${USER}:ro", fs.Path, fs.Path)) | |
| mounts = append(mounts, fmt.Sprintf("%s:/home%s:ro", fs.Path, fs.Path)) |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
fs.Path/${USER}instead of letting the user see a huge list of inaccessible private folders.