You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
use of ~ (home directory alias) does not resolve, and no warning message about it #5410
bugConfirmed bugs or reports that are very likely to be bugsmacOSIssues specific to Desktop usage on macOSpriority-3Bugs that affect small number of users and/or relatively cosmetic in nature
@catalandres I tried to reproduce this and the issue is not with the .zprezto folder but with using ~/, which we don't resolve currently. I'll update the issue to reflect this, because we should make it clearer that we're not currently doing that.
changed the title [-]Cannot add a local repository in a hidden (dot-prefixed) folder[/-][+]use of ~ (home directory alias) does not resolve, and no warning message about it[/+]on Aug 22, 2018
Still reproduces in 3.6.3 on macOS 26.5.2. @shiftkey's 2018 diagnosis is still the right one, though the code has moved on a bit since: untildifyis in this dialog now, it's just applied after the validation that rejects the path.
addRepository validates the raw text first and only expands afterwards:
const{ path }=this.stateconstisValidPath=awaitthis.validatePath(path)// raw path, still contains ~if(!isValidPath){this.pathTextBoxRef.current?.focus()return// never gets any further}constresolvedPath=this.resolvedPath(path)// untildify happens hereconstrepositories=awaitdispatcher.addRepositories([resolvedPath])
validatePath → getRepositoryType starts with a directoryExists check, and a literal ~/… doesn't exist as far as the filesystem is concerned, so the result is always missing and the early return means resolvedPath is never reached. Validating the resolved path instead would fix it — resolvedPath already handles the tilde and makes the path absolute.
The symptom has changed since the original report, for anyone searching: the Add Repository button is no longer greyed out (there's no disabled on it any more), so it looks clickable. Clicking it just shows "This directory does not appear to be a Git repository" and offers to create one at a path that already has a repository.
It's also worse than it first appears, because the warning doesn't clear when you correct the path (#22648) — so after a tilde path fails, switching to the absolute path leaves the warning on screen next to a path that's perfectly valid, which reads as though the repository itself is the problem.
I opened #22651 for this before spotting this issue, and I've closed it in favour of this one.
I'll put a PR up shortly. Could someone add help wanted here if you'd like it? Without it the PR trips the requirements check and gets marked unmet-requirements, which seems a shame for an eight-year-old bug with a one-line fix.
Could a maintainer add the help wanted label to this issue?
I have a tested fix ready in #22652: the dialog validates the path before expanding ~, so it now validates the resolved path instead. It's a draft for now because I already have a PR open in this repo, and I'll take it out of draft as soon as that one merges. Verified in a development build: repositories under ~/… now add, plain folders under ~ are still rejected, and absolute paths behave as before.
bugConfirmed bugs or reports that are very likely to be bugsmacOSIssues specific to Desktop usage on macOSpriority-3Bugs that affect small number of users and/or relatively cosmetic in nature
Activity
shiftkey commentedon Aug 15, 2018
@catalandres can you also include the OS and version of Desktop you are running, to help with reproducing the issue?
shiftkey commentedon Aug 22, 2018
@catalandres I tried to reproduce this and the issue is not with the
.zpreztofolder but with using~/, which we don't resolve currently. I'll update the issue to reflect this, because we should make it clearer that we're not currently doing that.[-]Cannot add a local repository in a hidden (dot-prefixed) folder[/-][+]use of ~ (home directory alias) does not resolve, and no warning message about it[/+]francisrath commentedon Aug 4, 2026
Still reproduces in 3.6.3 on macOS 26.5.2. @shiftkey's 2018 diagnosis is still the right one, though the code has moved on a bit since:
untildifyis in this dialog now, it's just applied after the validation that rejects the path.addRepositoryvalidates the raw text first and only expands afterwards:validatePath→getRepositoryTypestarts with adirectoryExistscheck, and a literal~/…doesn't exist as far as the filesystem is concerned, so the result is alwaysmissingand the early return meansresolvedPathis never reached. Validating the resolved path instead would fix it —resolvedPathalready handles the tilde and makes the path absolute.The symptom has changed since the original report, for anyone searching: the Add Repository button is no longer greyed out (there's no
disabledon it any more), so it looks clickable. Clicking it just shows "This directory does not appear to be a Git repository" and offers to create one at a path that already has a repository.It's also worse than it first appears, because the warning doesn't clear when you correct the path (#22648) — so after a tilde path fails, switching to the absolute path leaves the warning on screen next to a path that's perfectly valid, which reads as though the repository itself is the problem.
I opened #22651 for this before spotting this issue, and I've closed it in favour of this one.
I'll put a PR up shortly. Could someone add
help wantedhere if you'd like it? Without it the PR trips the requirements check and gets markedunmet-requirements, which seems a shame for an eight-year-old bug with a one-line fix.Add the add, create and clone repository dialogs
feat: add/create/clone dialogs, cloning view, dialog host, focus fixes
Add the add, create and clone repository dialogs
Add the add, create and clone repository dialogs
feat: add/create/clone dialogs, cloning view, dialog host, focus fixes
francisrath commentedon Oct 13, 2026
Could a maintainer add the
help wantedlabel to this issue?I have a tested fix ready in #22652: the dialog validates the path before expanding
~, so it now validates the resolved path instead. It's a draft for now because I already have a PR open in this repo, and I'll take it out of draft as soon as that one merges. Verified in a development build: repositories under~/…now add, plain folders under~are still rejected, and absolute paths behave as before.