Skip to content

Commit 3d3e5b8

Browse files
authored
[minor fix] hide hook command; update obsolete comment (#1229)
## Summary Minor followup to #1172 ## How was it tested?
1 parent 80a444d commit 3d3e5b8

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

internal/boxcli/hook.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ type hookFlags struct {
1515
func hookCmd() *cobra.Command {
1616
flags := hookFlags{}
1717
cmd := &cobra.Command{
18-
Use: "hook [shell]",
19-
Short: "Print shell command to setup the shell hook to ensure an up-to-date environment",
20-
Args: cobra.ExactArgs(1),
18+
Use: "hook [shell]",
19+
Short: "Print shell command to setup the shell hook to ensure an up-to-date environment",
20+
Args: cobra.ExactArgs(1),
21+
Hidden: true,
2122
RunE: func(cmd *cobra.Command, args []string) error {
2223
output, err := hookFunc(cmd, args, flags)
2324
if err != nil {

internal/impl/devbox.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -819,6 +819,8 @@ func (d *Devbox) computeNixEnv(ctx context.Context, usePrintDevEnvCache bool) (m
819819

820820
envPaths := []string{}
821821
if !featureflag.PromptHook.Enabled() {
822+
// Prepend the bin-wrappers directory to the PATH. This ensures that
823+
// bin-wrappers execute before the unwrapped binaries.
822824
envPaths = append(envPaths, filepath.Join(d.projectDir, plugin.WrapperBinPath))
823825
}
824826
// Adding profile bin path is a temporary hack. Some packages .e.g. curl
@@ -831,8 +833,6 @@ func (d *Devbox) computeNixEnv(ctx context.Context, usePrintDevEnvCache bool) (m
831833
// nix recursive bin lookup.
832834
envPaths = append(envPaths, nix.ProfileBinPath(d.projectDir), env["PATH"])
833835

834-
// Prepend virtenv bin path first so user can override it if needed. Virtenv
835-
// is where the bin wrappers live
836836
env["PATH"] = JoinPathLists(envPaths...)
837837

838838
// Include env variables in devbox.json

0 commit comments

Comments
 (0)