Changing project directory to (macOS) alias of same name breaks app
See original GitHub issueDescription
I had a directory, Projects
, that contained all of my GitHub project directories. I recently needed to move that directory to another drive, but wanted to alias it so I wouldn’t get confused. I kept the name of the alias the same as the directory. Upon opening GitHub Desktop, I would get a non-graceful Error: spawn ENOTDIR
. It was not possible to remove the repository.
This was fixed by changing the name of the alias, but I figured maintainers might want to, at the very least, change the error message. If Desktop can follow aliases, it can’t when a folder once was directly in a directory.
Version
GitHub Desktop version: 0.8.2-77b74af1
OS version: macOS Sierra 10.12.6 (16G29)
Steps to Reproduce
- Clone a repository into
/some/random/path/Repository
from GitHub Desktop. - Close GitHub Desktop and move the repository, adding an alias through the context menu:
/some/random/path/Repository
. - Open GitHub Desktop.
Expected behavior: Either stating that the repository was not found, or following the alias/symlink to the new repository.
Actual behavior: Error: spawn ENOTDIR
.
Reproduces how often: 100%.
Logs
2017-09-13T07:41:45.145Z - error: [ui] Error performing periodic fetch
Error: spawn ENOTDIR
at exports._errnoException (util.js:1050:11)
at ChildProcess.spawn (internal/child_process.js:319:11)
at exports.spawn (child_process.js:390:9)
at Object.exports.execFile (child_process.js:155:15)
at Object.module.(anonymous function) [as execFile] (ELECTRON_ASAR.js:200:20)
at /webpack:/app/node_modules/dugite/build/lib/git-process.js:65:1
at Promise (<anonymous>)
at Function.exec (/webpack:/app/node_modules/dugite/build/lib/git-process.js:48:1)
at a.measure (/webpack:/app/src/lib/git/core.ts:113:13)
at Object.t.measure (/webpack:/app/src/ui/lib/git-perf.ts:22:10)
2017-09-13T07:42:12.530Z - info: [ui] Executing installGlobalLFSFilter: git lfs install --skip-repo (took 1.358s)
Additional Information
None that I can think of.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:12 (5 by maintainers)
Top GitHub Comments
No worries. I should note that aliases normally work (though I’m not too familiar with the macOS filesystem). Only when the directory is moved and an alias is placed where the directory used to be does this error occur.
Thanks for working on some pretty useful software 😄 !
Huh, yeah, it’s not terribly surprising that we’re not resolving aliases, but we definitely should be.
Thanks for letting us know @paced!