From b780608e9050a39e7dcfdb13b4b13bdc57d053dd Mon Sep 17 00:00:00 2001 From: Federico Guerinoni Date: Thu, 26 May 2022 12:12:56 +0200 Subject: [PATCH] Quote path of repo in order to have a valid copy paste command Closes #5602 --- pkg/cmd/repo/create/create.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cmd/repo/create/create.go b/pkg/cmd/repo/create/create.go index 89aaa3622..2dcf70524 100644 --- a/pkg/cmd/repo/create/create.go +++ b/pkg/cmd/repo/create/create.go @@ -443,7 +443,7 @@ func createFromLocal(opts *CreateOptions) error { if repoPath == "." { return fmt.Errorf("current directory is not a git repository. Run `git init` to initalize it") } - return fmt.Errorf("%s is not a git repository. Run `git -C %s init` to initialize it", absPath, repoPath) + return fmt.Errorf("%s is not a git repository. Run `git -C \"%s\" init` to initialize it", absPath, repoPath) } committed, err := hasCommits(repoPath)