mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-11 08:06:25 -04:00
When a user switches into a repo whose .envrc hasn't been approved with `direnv allow`, the previous behavior was to drop a "blocked" error popup and leave the user to fix it externally. That meant opening a terminal, running `direnv allow`, and then either restarting lazygit or switching repos and back to refresh the env — easy to get wrong, easy to forget. When `direnv export json` exits non-zero, follow up with `direnv status --json` to ask direnv whether the current directory has a not-yet- allowed .envrc, and if so, get its path. Then show a confirmation popup with the .envrc contents inline so the user can read what they're approving. Confirming runs `direnv allow <path>` and re-runs the load so the new env reaches subprocesses immediately; cancelling leaves the env unloaded (the same state as before this commit when direnv refused to load the .envrc). Using `direnv status --json` instead of parsing the "is blocked" stderr line means we rely on direnv's structured output rather than its human-readable error format, which is more stable across versions and avoids assumptions about output formatting. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| amend_helper.go | ||
| app_status_helper.go | ||
| bisect_helper.go | ||
| branches_helper.go | ||
| cherry_pick_helper.go | ||
| commits_helper.go | ||
| commits_helper_test.go | ||
| confirmation_helper.go | ||
| credentials_helper.go | ||
| diff_helper.go | ||
| files_helper.go | ||
| fixup_helper.go | ||
| fixup_helper_test.go | ||
| gpg_helper.go | ||
| helpers.go | ||
| host_helper.go | ||
| inline_status_helper.go | ||
| menu_key.go | ||
| merge_and_rebase_helper.go | ||
| merge_conflicts_helper.go | ||
| mode_helper.go | ||
| patch_building_helper.go | ||
| record_directory_helper.go | ||
| refresh_helper.go | ||
| refresh_helper_test.go | ||
| refs_helper.go | ||
| repos_helper.go | ||
| search_helper.go | ||
| signal_handling.go | ||
| signal_handling_windows.go | ||
| snake_helper.go | ||
| staging_helper.go | ||
| sub_commits_helper.go | ||
| suggestions_helper.go | ||
| suspend_resume_helper.go | ||
| tags_helper.go | ||
| update_helper.go | ||
| upstream_helper.go | ||
| upstream_helper_test.go | ||
| view_helper.go | ||
| window_arrangement_helper.go | ||
| window_arrangement_helper_test.go | ||
| window_helper.go | ||
| working_tree_helper.go | ||
| worktree_helper.go | ||