Skip to content
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.

Git cookbook profiler needs better error message when it fails on windows symlinks #571

Open
danielsdeleo opened this issue Oct 19, 2015 · 0 comments
Labels

Comments

@danielsdeleo
Copy link
Contributor

Many git commands don't work correctly if the git repo is in a windows symlink. In ChefDK, this can manifest as an error like:

Error: Failed to generate Policyfile.lock 
Reason: (Mixlib::ShellOut::ShellCommandFailed) Expected process to exit with [0], but received '128' 
---- Begin output of git symbolic-ref -q HEAD ---- 
STDOUT: 
STDERR: fatal: Invalid symlink 'C:/vagrant': Function not implemented 
---- End output of git symbolic-ref -q HEAD ---- 

Based on mailing list discussions, it seems like this can't/won't be fixed by git/msys-git folks. There is a FAQ entry about it here: https://github.com/msysgit/msysgit/wiki/Why-am-I-getting-fatal-Invalid-symlink-....-Function-not-supported.-error-when-initcloneing

However, the newer distribution of git for windows makes it seem like symlinks might work a little better on newer versions of Git: https://github.com/git-for-windows/git/wiki/Symbolic-Links

In either case, since users may not know about the cookbook profiler feature, they'll probably find it unexpected that ChefDK is running git commands on their path: cookbooks, so this error will be a crappy experience. At the very least, it would be good to raise a custom error type with more in-depth information than just the raw git error.

@lamont-granquist lamont-granquist added this to the Accepted Minor milestone Feb 1, 2017
@lamont-granquist lamont-granquist changed the title Git cookbook profiler fails on windows symlinks Git cookbook profiler needs better error message when it fails on windows symlinks Feb 1, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

3 participants