Skip to content

Revert "fix(direnv): set DEVBOX_SHELL_ENABLED when entering env via shellenv --init-hook"#2890

Merged
mikeland73 merged 1 commit into
mainfrom
revert-2861-claude/focused-goldberg-39laj0
Jun 23, 2026
Merged

Revert "fix(direnv): set DEVBOX_SHELL_ENABLED when entering env via shellenv --init-hook"#2890
mikeland73 merged 1 commit into
mainfrom
revert-2861-claude/focused-goldberg-39laj0

Conversation

@mikeland73

Copy link
Copy Markdown
Collaborator

Reverts #2861

@mikeland73 mikeland73 requested review from Lagoja and Copilot June 23, 2026 20:18
@mikeland73 mikeland73 merged commit be5b810 into main Jun 23, 2026
26 checks passed
@mikeland73 mikeland73 deleted the revert-2861-claude/focused-goldberg-39laj0 branch June 23, 2026 20:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reverts the recently-merged change from #2861 that set DEVBOX_SHELL_ENABLED=1 when generating environment exports via devbox shellenv --init-hook (the code path used by the direnv integration).

Changes:

  • Removes DEVBOX_SHELL_ENABLED injection from Devbox.EnvExports when RunHooks is enabled.
  • Removes the regression testscript that asserted shellenv --init-hook exports DEVBOX_SHELL_ENABLED.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
testscripts/shell/shellenv_init_hook.test.txt Removes the test covering shellenv --init-hook output contract around DEVBOX_SHELL_ENABLED.
internal/devbox/devbox.go Reverts the EnvExports behavior that exported DEVBOX_SHELL_ENABLED when init hooks are requested.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/devbox/devbox.go
Comment on lines 377 to 381
envs, err = d.ensureStateIsUpToDateAndComputeEnv(ctx, opts.EnvOptions)
if err != nil {
return "", err
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants