Skip to content

Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows

fix(bare-repo): UX fixes for worktree-path prompt and `wt config create --project` in bare repos (#2951)

Adriano Machadoca91420e1ee2
diff --git a/docs/content/tips-patterns.md b/docs/content/tips-patterns.md
index 0e4ec178e..614d02403 100644
--- a/docs/content/tips-patterns.md
+++ b/docs/content/tips-patterns.md
@@ -432,20 +432,42 @@ With `worktree-path = "{{ repo_path }}/../{{ branch | sanitize }}"`, worktrees b
```
myproject/
├── .git/ # bare repository
-├── main/ # default branch
-├── feature/ # feature branch
-└── bugfix/ # bugfix branch
+├── main/ # default branch worktree
+├── feature/ # feature branch worktree
+└── bugfix/ # bugfix branch worktree
```
-Configure worktrunk:
+### Configure the worktree path
+
+On first `wt switch` in a bare repo at a hidden path (`.git`, `.bare`), worktrunk detects that the default template would produce broken paths like `myproject/.git.main` and offers a fix:
+
+```
+▲ Bare repo at myproject/.git — worktrees will be at myproject/.git.main
+◎ Configure worktree-path to place worktrees at myproject/main? [y/N/?]
+```
+
+Accepting writes a project-scoped entry to user config:
```toml
# ~/.config/worktrunk/config.toml
+[projects."github.com/myorg/myrepo"]
worktree-path = "{{ repo_path }}/../{{ branch | sanitize }}"
```
-Create the first worktree:
+Run `wt config show` from inside any worktree to find the project identifier (`Identifier: …` in the PROJECT CONFIG section). Set it globally with `worktree-path = "..."` at the top level if this layout is preferred for all bare repos.
+
+### Create the first worktree
-{{ terminal(cmd="wt switch --create main") }}
+{{ terminal(cmd="wt switch main") }}
+
+For a freshly cloned bare repo the default branch already exists, so `wt switch main` (without `--create`) is enough. Use `wt switch --create <branch>` for new branches.
Now `wt switch --create feature` creates `myproject/feature/`.
+
+### Set up the project config
+
+The project config (`.config/wt.toml`) must live inside a worktree — the bare `.git` directory has no tracked files. Once the first worktree exists, create it from there:
+
+{{ terminal(cmd="cd myproject/main|||wt config create --project") }}
+
+Commit the file and it will appear in every worktree automatically.
diff --git a/skills/worktrunk/reference/tips-patterns.md b/skills/worktrunk/reference/tips-patterns.md
index 90c6cccab..b77d553e4 100644
--- a/skills/worktrunk/reference/tips-patterns.md
+++ b/skills/worktrunk/reference/tips-patterns.md
@@ -456,22 +456,47 @@ With `worktree-path = "{{ repo_path }}/../{{ branch | sanitize }}"`, worktrees b
```
myproject/
├── .git/ # bare repository
-├── main/ # default branch
-├── feature/ # feature branch
-└── bugfix/ # bugfix branch
+├── main/ # default branch worktree
+├── feature/ # feature branch worktree
+└── bugfix/ # bugfix branch worktree
```
-Configure worktrunk:
+### Configure the worktree path
+
+On first `wt switch` in a bare repo at a hidden path (`.git`, `.bare`), worktrunk detects that the default template would produce broken paths like `myproject/.git.main` and offers a fix:
+
+```
+▲ Bare repo at myproject/.git — worktrees will be at myproject/.git.main
+◎ Configure worktree-path to place worktrees at myproject/main? [y/N/?]
+```
+
+Accepting writes a project-scoped entry to user config:
```toml
# ~/.config/worktrunk/config.toml
+[projects."github.com/myorg/myrepo"]
worktree-path = "{{ repo_path }}/../{{ branch | sanitize }}"
```
-Create the first worktree:
+Run `wt config show` from inside any worktree to find the project identifier (`Identifier: …` in the PROJECT CONFIG section). Set it globally with `worktree-path = "..."` at the top level if this layout is preferred for all bare repos.
+
+### Create the first worktree
```bash
-wt switch --create main
+wt switch main
```
+For a freshly cloned bare repo the default branch already exists, so `wt switch main` (without `--create`) is enough. Use `wt switch --create <branch>` for new branches.
+
Now `wt switch --create feature` creates `myproject/feature/`.
+
+### Set up the project config
+
+The project config (`.config/wt.toml`) must live inside a worktree — the bare `.git` directory has no tracked files. Once the first worktree exists, create it from there:
+
+```bash
+cd myproject/main
+wt config create --project
+```
+
+Commit the file and it will appear in every worktree automatically.
diff --git a/src/commands/config/create.rs b/src/commands/config/create.rs
index 330e83a4f..3b511d18c 100644
--- a/src/commands/config/create.rs
+++ b/src/commands/config/create.rs
@@ -43,9 +43,16 @@ pub(super) fn comment_out_config(content: &str) -> String {
pub fn handle_config_create(project: bool) -> anyhow::Result<()> {
if project {
let repo = Repository::current()?;
- let config_path = repo
- .project_config_path()?
- .context("Cannot determine project config location — no worktree found")?;
+ let config_path = repo.project_config_path()?.ok_or_else(|| {
+ if repo.is_bare().unwrap_or(false) {
+ anyhow::anyhow!(
+ "Bare repository has no linked worktrees yet.\n\
+ Run `wt switch <branch>` to create a worktree first, then run `wt config create --project` from inside it."
+ )
+ } else {
+ anyhow::anyhow!("Cannot determine project config location — no worktree found")
+ }
+ })?;
let user_config_exists = require_config_path().map(|p| p.exists()).unwrap_or(false);
create_config_file(
config_path,
diff --git a/src/commands/worktree/resolve.rs b/src/commands/worktree/resolve.rs
index 556176fb9..cf0270147 100644
--- a/src/commands/worktree/resolve.rs
+++ b/src/commands/worktree/resolve.rs
@@ -199,11 +199,19 @@ fn template_references_repo_name(template: &str) -> bool {
pub fn offer_bare_repo_worktree_path_fix(
repo: &Repository,
config: &mut UserConfig,
+ branch: &str,
) -> anyhow::Result<bool> {
if !repo.is_bare()? {
return Ok(false);
}
+ // Symbolic identifiers (-, @, ^, pr:N, mr:N) haven't been resolved to a real
+ // branch name yet, so the example paths would be misleading. Skip the prompt;
+ // it will surface on the next switch with a concrete branch name.
+ if branch == "-" || branch == "@" || branch == "^" || branch.contains(':') {
+ return Ok(false);
+ }
+
let repo_path = repo.repo_path()?;
let repo_name = repo_path.file_name().and_then(|n| n.to_str()).unwrap_or("");
if !repo_name.starts_with('.') {
@@ -235,9 +243,12 @@ pub fn offer_bare_repo_worktree_path_fix(
.and_then(|n| n.to_str())
.unwrap_or("project");
- // Example paths to show the user what changes
- let example_bad = format!("{parent_name}/{repo_name}.feature-auth");
- let example_good = format!("{parent_name}/feature-auth");
+ // Use the actual branch being switched to in example paths. Calling
+ // `sanitize_branch_name` keeps the displayed example aligned with what
+ // the `sanitize` Jinja filter applies inside `BARE_REPO_WORKTREE_PATH`.
+ let sanitized = worktrunk::config::sanitize_branch_name(branch);
+ let example_bad = format!("{parent_name}/{repo_name}.{sanitized}");
+ let example_good = format!("{parent_name}/{sanitized}");
let config_path_display = worktrunk::config::config_path()
.map(|p| format_path_for_display(&p).to_string())
diff --git a/src/commands/worktree/switch.rs b/src/commands/worktree/switch.rs
index 86b4ad182..afc7f9a0c 100644
--- a/src/commands/worktree/switch.rs
+++ b/src/commands/worktree/switch.rs
@@ -1573,7 +1573,7 @@ impl SwitchPipeline<'_> {
// Offer to fix worktree-path for bare repos with hidden directory names
// (.git, .bare) before anything reads worktree-path config.
- offer_bare_repo_worktree_path_fix(repo, config)?;
+ offer_bare_repo_worktree_path_fix(repo, config, identifier)?;
// Run pre-switch hooks before branch resolution or worktree creation.
// {{ branch }} receives the raw user input (before resolution). Skip
diff --git a/tests/integration_tests/bare_repository.rs b/tests/integration_tests/bare_repository.rs
index 4b5d30fd2..e895f4a1c 100644
--- a/tests/integration_tests/bare_repository.rs
+++ b/tests/integration_tests/bare_repository.rs
@@ -1554,6 +1554,32 @@ fn test_bare_repo_worktree_path_prompt_non_interactive_warning() {
});
}
+/// Symbolic identifiers (-, @, pr:N) are passed before branch resolution, so
+/// the example paths in the prompt would show the raw symbol. The function
+/// must return early without prompting.
+#[test]
+fn test_bare_repo_worktree_path_prompt_skipped_for_symbolic_identifier() {
+ let test = setup_unconfigured_nested_bare_repo();
+ let main_worktree = test.project_path().join("main");
+
+ // `@` means HEAD — resolves to `main`, which already exists. The prompt
+ // must not appear because `@` is a symbolic form.
+ let mut cmd = wt_command();
+ test.configure_wt_cmd(&mut cmd);
+ cmd.args(["switch", "@"]).current_dir(&main_worktree);
+ let output = cmd.output().unwrap();
+
+ let stderr = String::from_utf8_lossy(&output.stderr);
+ assert!(
+ !stderr.contains("Configure worktree-path"),
+ "Prompt should not appear for symbolic identifier '@', got: {stderr}"
+ );
+ assert!(
+ !stderr.contains("Bare repo at"),
+ "Warning should not appear for symbolic identifier '@', got: {stderr}"
+ );
+}
+
// =============================================================================
// PTY-based interactive prompt tests
// =============================================================================
diff --git a/tests/integration_tests/config_init.rs b/tests/integration_tests/config_init.rs
index 75cc620d3..64b48d62d 100644
--- a/tests/integration_tests/config_init.rs
+++ b/tests/integration_tests/config_init.rs
@@ -119,3 +119,16 @@ run = "echo hello"
");
});
}
+
+/// Running `wt config create --project` from inside a repo's `.git` directory
+/// (not inside a worktree, not a bare repo) must fail with the generic
+/// "no worktree found" error rather than the bare-repo-specific message.
+#[rstest]
+fn test_config_create_project_from_git_dir_errors(repo: TestRepo) {
+ let git_dir = repo.path().join(".git");
+ let settings = setup_snapshot_settings(&repo);
+ settings.bind(|| {
+ let mut cmd = make_snapshot_cmd(&repo, "config", &["create", "--project"], Some(&git_dir));
+ assert_cmd_snapshot!(cmd);
+ });
+}
diff --git a/tests/snapshots/integration__integration_tests__bare_repository__bare_repo_prompt_pty__bare_repo_prompt_accept.snap b/tests/snapshots/integration__integration_tests__bare_repository__bare_repo_prompt_pty__bare_repo_prompt_accept.snap
index 0986ffdcc..07dfa551d 100644
--- a/tests/snapshots/integration__integration_tests__bare_repository__bare_repo_prompt_pty__bare_repo_prompt_accept.snap
+++ b/tests/snapshots/integration__integration_tests__bare_repository__bare_repo_prompt_pty__bare_repo_prompt_accept.snap
@@ -2,9 +2,9 @@
source: tests/integration_tests/bare_repository.rs
expression: "&output"
---
-▲ Bare repo at project/.git — worktrees will be at project/.git.feature-auth
+▲ Bare repo at project/.git — worktrees will be at project/.git.feature
-❯ Configure worktree-path to place worktrees at project/feature-auth? [y/N/?] y
+❯ Configure worktree-path to place worktrees at project/feature? [y/N/?] y
✓ Set worktree-path for [TEMP]/project:
  worktree-path = "{{ repo_path }}/../{{ branch | sanitize }}"
↳ To set globally, add to [TEMP]/test-config.toml
diff --git a/tests/snapshots/integration__integration_tests__bare_repository__bare_repo_prompt_pty__bare_repo_prompt_decline.snap b/tests/snapshots/integration__integration_tests__bare_repository__bare_repo_prompt_pty__bare_repo_prompt_decline.snap
index 16e620a59..ec2a232e5 100644
--- a/tests/snapshots/integration__integration_tests__bare_repository__bare_repo_prompt_pty__bare_repo_prompt_decline.snap
+++ b/tests/snapshots/integration__integration_tests__bare_repository__bare_repo_prompt_pty__bare_repo_prompt_decline.snap
@@ -2,9 +2,9 @@
source: tests/integration_tests/bare_repository.rs
expression: "&output"
---
-▲ Bare repo at project/.git — worktrees will be at project/.git.feature-auth
+▲ Bare repo at project/.git — worktrees will be at project/.git.feature
-❯ Configure worktree-path to place worktrees at project/feature-auth? [y/N/?] n
+❯ Configure worktree-path to place worktrees at project/feature? [y/N/?] n
✓ Created branch feature and worktree @ [TEMP]/project/.git.feature
↳ To customize worktree locations, run wt config create
▲ Cannot change directory — shell integration not installed
diff --git a/tests/snapshots/integration__integration_tests__bare_repository__bare_repo_prompt_pty__bare_repo_prompt_preview.snap b/tests/snapshots/integration__integration_tests__bare_repository__bare_repo_prompt_pty__bare_repo_prompt_preview.snap
index 35ab245d2..7a4757324 100644
--- a/tests/snapshots/integration__integration_tests__bare_repository__bare_repo_prompt_pty__bare_repo_prompt_preview.snap
+++ b/tests/snapshots/integration__integration_tests__bare_repository__bare_repo_prompt_pty__bare_repo_prompt_preview.snap
@@ -2,14 +2,14 @@
source: tests/integration_tests/bare_repository.rs
expression: "&output"
---
-▲ Bare repo at project/.git — worktrees will be at project/.git.feature-auth
+▲ Bare repo at project/.git — worktrees will be at project/.git.feature
-❯ Configure worktree-path to place worktrees at project/feature-auth? [y/N/?] ?
+❯ Configure worktree-path to place worktrees at project/feature? [y/N/?] ?
○ Would add to [TEMP]/test-config.toml:
  [projects."[TEMP]/project/.git"]
  worktree-path = "{{ repo_path }}/../{{ branch | sanitize }}"
-❯ Configure worktree-path to place worktrees at project/feature-auth? [y/N/?] n
+❯ Configure worktree-path to place worktrees at project/feature? [y/N/?] n
✓ Created branch feature and worktree @ [TEMP]/project/.git.feature
↳ To customize worktree locations, run wt config create
▲ Cannot change directory — shell integration not installed
diff --git a/tests/snapshots/integration__integration_tests__bare_repository__bare_repo_worktree_path_prompt_auto_accept.snap b/tests/snapshots/integration__integration_tests__bare_repository__bare_repo_worktree_path_prompt_auto_accept.snap
index 5f650b320..2d6e88bdf 100644
--- a/tests/snapshots/integration__integration_tests__bare_repository__bare_repo_worktree_path_prompt_auto_accept.snap
+++ b/tests/snapshots/integration__integration_tests__bare_repository__bare_repo_worktree_path_prompt_auto_accept.snap
@@ -12,15 +12,20 @@ info:
COLUMNS: "500"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_COMMON_DIR: ""
GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
GIT_CONFIG_SYSTEM: /dev/null
+ GIT_DIR: ""
GIT_EDITOR: ""
+ GIT_INDEX_FILE: ""
+ GIT_OBJECT_DIRECTORY: ""
GIT_TERMINAL_PROMPT: "0"
+ GIT_WORK_TREE: ""
LANG: C
LC_ALL: C
+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"
NO_COLOR: ""
PSModulePath: ""
- RUST_LOG: warn
SHELL: ""
TERM: alacritty
WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
@@ -28,21 +33,27 @@ info:
WORKTRUNK_DIRECTIVE_CD_FILE: "[DIRECTIVE_CD_FILE]"
WORKTRUNK_DIRECTIVE_EXEC_FILE: "[DIRECTIVE_EXEC_FILE]"
WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
+ WORKTRUNK_TEST_BASH_INSTALLED: "0"
WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
+ WORKTRUNK_TEST_FISH_INSTALLED: "0"
+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"
---
success: true
exit_code: 0
----- stdout -----
----- stderr -----
-▲ Bare repo at project/.git — worktrees will be at project/.git.feature-auth
-↳ To place worktrees at project/feature-auth, add to [TEMP]/test-config.toml:
+▲ Bare repo at project/.git — worktrees will be at project/.git.feature
+↳ To place worktrees at project/feature, add to [TEMP]/test-config.toml:
[projects."[TEMP]/project/.git"]
worktree-path = "{{ repo_path }}/../{{ branch | sanitize }}"
✓ Created branch feature and worktree @ [TEMP]/project/.git.feature
diff --git a/tests/snapshots/integration__integration_tests__bare_repository__bare_repo_worktree_path_prompt_non_interactive_warning.snap b/tests/snapshots/integration__integration_tests__bare_repository__bare_repo_worktree_path_prompt_non_interactive_warning.snap
index f0260b59f..688e7e56b 100644
--- a/tests/snapshots/integration__integration_tests__bare_repository__bare_repo_worktree_path_prompt_non_interactive_warning.snap
+++ b/tests/snapshots/integration__integration_tests__bare_repository__bare_repo_worktree_path_prompt_non_interactive_warning.snap
@@ -11,15 +11,20 @@ info:
COLUMNS: "500"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_COMMON_DIR: ""
GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
GIT_CONFIG_SYSTEM: /dev/null
+ GIT_DIR: ""
GIT_EDITOR: ""
+ GIT_INDEX_FILE: ""
+ GIT_OBJECT_DIRECTORY: ""
GIT_TERMINAL_PROMPT: "0"
+ GIT_WORK_TREE: ""
LANG: C
LC_ALL: C
+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"
NO_COLOR: ""
PSModulePath: ""
- RUST_LOG: warn
SHELL: ""
TERM: alacritty
WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
@@ -27,21 +32,27 @@ info:
WORKTRUNK_DIRECTIVE_CD_FILE: "[DIRECTIVE_CD_FILE]"
WORKTRUNK_DIRECTIVE_EXEC_FILE: "[DIRECTIVE_EXEC_FILE]"
WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
+ WORKTRUNK_TEST_BASH_INSTALLED: "0"
WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"
WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
+ WORKTRUNK_TEST_FISH_INSTALLED: "0"
+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"
---
success: true
exit_code: 0
----- stdout -----
----- stderr -----
-▲ Bare repo at project/.git — worktrees will be at project/.git.feature-auth
-↳ To place worktrees at project/feature-auth, add to [TEMP]/test-config.toml:
+▲ Bare repo at project/.git — worktrees will be at project/.git.feature
+↳ To place worktrees at project/feature, add to [TEMP]/test-config.toml:
[projects."[TEMP]/project/.git"]
worktree-path = "{{ repo_path }}/../{{ branch | sanitize }}"
✓ Created branch feature and worktree @ [TEMP]/project/.git.feature
diff --git a/tests/snapshots/integration__integration_tests__config_init__config_create_project_from_git_dir_errors.snap b/tests/snapshots/integration__integration_tests__config_init__config_create_project_from_git_dir_errors.snap
new file mode 100644
index 000000000..4009751ce
--- /dev/null
+++ b/tests/snapshots/integration__integration_tests__config_init__config_create_project_from_git_dir_errors.snap
@@ -0,0 +1,59 @@
+---
+source: tests/integration_tests/config_init.rs
+info:
+ program: wt
+ args:
+ - config
+ - create
+ - "--project"
+ env:
+ APPDATA: "[TEST_CONFIG_HOME]"
+ CLICOLOR_FORCE: "1"
+ COLUMNS: "500"
+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_COMMON_DIR: ""
+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
+ GIT_CONFIG_SYSTEM: /dev/null
+ GIT_DIR: ""
+ GIT_EDITOR: ""
+ GIT_INDEX_FILE: ""
+ GIT_OBJECT_DIRECTORY: ""
+ GIT_TERMINAL_PROMPT: "0"
+ GIT_WORK_TREE: ""
+ HOME: "[TEST_HOME]"
+ LANG: C
+ LC_ALL: C
+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"
+ MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
+ NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
+ PATH: "[PATH]"
+ PSModulePath: ""
+ SHELL: ""
+ TERM: alacritty
+ USERPROFILE: "[TEST_HOME]"
+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
+ WORKTRUNK_TEST_BASH_INSTALLED: "0"
+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"
+ WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
+ WORKTRUNK_TEST_EPOCH: "1735776000"
+ WORKTRUNK_TEST_FISH_INSTALLED: "0"
+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"
+ WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
+ WORKTRUNK_TEST_POWERSHELL_ENV: "0"
+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"
+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
+---
+success: false
+exit_code: 1
+----- stdout -----
+
+----- stderr -----
+✗ Cannot determine project config location — no worktree found