Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions lib/models/workdir-cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,13 @@ export default class WorkdirCache {
const gitDir = await CompositeGitStrategy.create(startDir).exec(['rev-parse', '--absolute-git-dir']);
return this.revParse(path.resolve(gitDir, '..'));
} catch (e) {
// eslint-disable-next-line no-console
console.error(
`Unable to locate git workspace root for ${startPath}. Expected if ${startPath} is not in a git repository.`,
e,
);
if (atom.config.get('github.reportCannotLocateWorkspaceError')) {
// eslint-disable-next-line no-console
console.error(
`Unable to locate git workspace root for ${startPath}. Expected if ${startPath} is not in a git repository.`,
e,
);
}
return null;
}
}
Expand Down
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,11 @@
"type": "string",
"default": "",
"description": "Comma-separated list of email addresses to exclude from the co-author selection list"
},
"reportCannotLocateWorkspaceError": {
"type": "boolean",
"default": "false",
"description": "Log an error to the console if a git repository cannot be located for the opened file "
}
},
"deserializers": {
Expand Down