New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log WorkdirCache errors to the console #1471

merged 2 commits into from May 17, 2018


None yet
1 participant

smashwilson commented May 17, 2018

@jasonrudolph saw something weird with the WorkdirCache on 0.15: a call to WorkdirCache.revParse() was returning null for a path that was pretty clearly within a git repository (a gitdir, to be exact). Calling git rev-parse manually at that path and its parent on the command line behaved normally.

We currently have a Pokémon catch block in place to handle git rev-parse errors:

} catch (e) {
return null;

My theory is that this is overzealously catching a (possibly non-git?) error that would show us the real problem here.

As a temporary measure to gather more data, I'm adding a console.error() call to dump that error before returning null.

In the long term, we'll likely want to keep something like this in place, but maybe gated by an instanceof GitError check or something.

smashwilson added some commits May 17, 2018

@smashwilson smashwilson merged commit f459219 into master May 17, 2018

3 checks passed

ci/circleci Your tests passed on CircleCI!
continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed

@smashwilson smashwilson deleted the aw/report-workdir-cache-errors branch May 17, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment