You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 26, 2025. It is now read-only.
The data-folder flag is basically useless (and potentially misleading) as we don't store data in any folder anymore.
PR Type
Enhancement
Description
• Remove deprecated data-folder flag and related code
• Expose branch flag to users with detailed usage description
• Simplify path structure by removing unused data folder parameter
• Update docker compose to use computed data folder path
Changes walkthrough 📝
Relevant files
Enhancement
clienv.go
Remove data folder from CLI environment
clienv/clienv.go
• Remove flagDataFolder parameter from NewPathStructure call
• Remove flagDataFolder constant and related flag definition • Expose branch flag by setting Hidden: false • Add detailed usage description for branch flag • Remove unused dataFolder variable
• Remove dataFolder parameter from function signatures • Compute data folder path internally using dotNhostFolder • Update function calls to remove data folder parameter
The data folder path is now computed as filepath.Join(dotNhostFolder, "data") instead of using the branch-specific path that was previously passed as parameter. This changes the data persistence behavior and should be validated to ensure it doesn't break existing functionality.
The branch flag is now exposed to users (Hidden: false) with a detailed usage description. The long usage text and behavior change should be validated to ensure it provides clear guidance without overwhelming users.
Usage: "Git branch name. If not set, it will be detected from the current git repository. This flag is used to dynamically create docker volumes for each branch. If you want to have a static volume name or if you are not using git, set this flag to a static value.", //nolint:lllEnvVars: []string{"BRANCH"},
Value: branch,
Hidden: false,
The dataFolder is now hardcoded without branch-specific isolation. This could cause data conflicts when switching between branches since all branches will share the same data directory.
Why: This is a critical issue that could cause data conflicts between branches. The suggestion correctly identifies that removing branch-specific isolation from the dataFolder path could lead to data corruption when switching branches, and provides the proper fix by adding sanitizeBranch(branch) to maintain isolation.
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
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.
User description
The data-folder flag is basically useless (and potentially misleading) as we don't store data in any folder anymore.
PR Type
Enhancement
Description
• Remove deprecated
data-folderflag and related code• Expose
branchflag to users with detailed usage description• Simplify path structure by removing unused data folder parameter
• Update docker compose to use computed data folder path
Changes walkthrough 📝
clienv.go
Remove data folder from CLI environmentclienv/clienv.go
• Remove
flagDataFolderparameter fromNewPathStructurecallfilesystem.go
Simplify path structure by removing data folderclienv/filesystem.go
• Remove
dataFolderfield fromPathStructurestruct• Remove
dataFolderparameter from constructor• Remove
DataFolder()methodflags.go
Remove data folder flag and expose branch flagclienv/flags.go
• Remove
flagDataFolderconstant and related flag definition• Expose
branchflag by settingHidden: false• Add detailed usage description
for branch flag
• Remove unused
dataFoldervariableup.go
Remove data folder parameter from compose setupcmd/dev/up.go
• Remove
ce.Path.DataFolder()parameter fromComposeFileFromConfigcall
compose.go
Compute data folder path internally in composedockercompose/compose.go
• Remove
dataFolderparameter from function signatures• Compute data
folder path internally using
dotNhostFolder• Update function calls to
remove data folder parameter
validate_test.go
Update test to match simplified path structurecmd/config/validate_test.go
• Remove
dataFolderparameter fromNewPathStructurecall in test