question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Changing project directory to (macOS) alias of same name breaks app

See original GitHub issue

Description

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

  1. Clone a repository into /some/random/path/Repository from GitHub Desktop.
  2. Close GitHub Desktop and move the repository, adding an alias through the context menu: /some/random/path/Repository.
  3. 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:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
pacedcommented, Sep 13, 2017

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 😄 !

1reaction
joshabercommented, Sep 13, 2017

Huh, yeah, it’s not terribly surprising that we’re not resolving aliases, but we definitely should be.

Thanks for letting us know @paced!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create and remove aliases on Mac - Apple Support
In the Finder on your Mac, create an alias to represent a file, folder, app, or disk. Put the alias in a convenient,...
Read more >
how to fix 100's of alias' on mac after migration? - Stack Overflow
1 Answer 1 ... I had same issue years ago (transfer between 2 media centers), and I made this program : it asks...
Read more >
Aliases and Symbolic Links | Problems with OS X Files
Aliases and Symbolic Links. An alias is a file that is pointer to a real (original) file located somewhere else. Thus, when you...
Read more >
What is the correct way to alias applications in OS X through ...
The way to open an app bundle on the Mac is to use open -a ${appname} , so you could / should replace...
Read more >
Aliases, hard links, symlinks, and copies in Mojave's APFS
Symbolic links are the most fragile of all the links available in macOS. Anything which changes that directory path will break a symbolic ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found