Skip to content

[minor fix] hide hook command; update obsolete comment #1229

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

Merged
merged 1 commit into from
Jun 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions internal/boxcli/hook.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ type hookFlags struct {
func hookCmd() *cobra.Command {
flags := hookFlags{}
cmd := &cobra.Command{
Use: "hook [shell]",
Short: "Print shell command to setup the shell hook to ensure an up-to-date environment",
Args: cobra.ExactArgs(1),
Use: "hook [shell]",
Short: "Print shell command to setup the shell hook to ensure an up-to-date environment",
Args: cobra.ExactArgs(1),
Hidden: true,
RunE: func(cmd *cobra.Command, args []string) error {
output, err := hookFunc(cmd, args, flags)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions internal/impl/devbox.go
Original file line number Diff line number Diff line change
Expand Up @@ -824,6 +824,8 @@ func (d *Devbox) computeNixEnv(ctx context.Context, usePrintDevEnvCache bool) (m

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

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

// Include env variables in devbox.json
Expand Down