From 7a4a0c85c433fd29185c05d0021cd0db87284f23 Mon Sep 17 00:00:00 2001 From: Cristian Betivu Date: Sat, 19 Aug 2023 19:12:36 +0300 Subject: [PATCH] Fix test --- pkg/commands/git_commands/repo_paths.go | 2 +- pkg/commands/git_commands/repo_paths_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/commands/git_commands/repo_paths.go b/pkg/commands/git_commands/repo_paths.go index e80b19a1c..13cda86a4 100644 --- a/pkg/commands/git_commands/repo_paths.go +++ b/pkg/commands/git_commands/repo_paths.go @@ -224,7 +224,7 @@ func getCurrentRepoGitDirPath( // If this error causes issues, we could relax the constraint and just always // return the path - return "", "", errors.Errorf("could not find git dir for %s: the path '%s' is not under `worktrees` or `modules` directories.", currentPath, worktreeGitPath) + return "", "", errors.Errorf("could not find git dir for %s: the path '%s' is not under `worktrees` or `modules` directories", currentPath, worktreeGitPath) } // takes a path containing a symlink and returns the true path diff --git a/pkg/commands/git_commands/repo_paths_test.go b/pkg/commands/git_commands/repo_paths_test.go index 1bee52ec5..5e6275522 100644 --- a/pkg/commands/git_commands/repo_paths_test.go +++ b/pkg/commands/git_commands/repo_paths_test.go @@ -135,7 +135,7 @@ func TestGetRepoPathsAux(t *testing.T) { }, Path: "/path/to/repo/my/submodule1", Expected: nil, - Err: errors.New("failed to get repo git dir path: could not find git dir for /path/to/repo/my/submodule1: path is not under `worktrees` or `modules` directories"), + Err: errors.New("failed to get repo git dir path: could not find git dir for /path/to/repo/my/submodule1: the path '/random/submodule1' is not under `worktrees` or `modules` directories"), }, }