This repository was archived by the owner on Dec 15, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -50,11 +50,13 @@ export default class WorkdirCache {
5050 const gitDir = await CompositeGitStrategy . create ( startDir ) . exec ( [ 'rev-parse' , '--absolute-git-dir' ] ) ;
5151 return this . revParse ( path . resolve ( gitDir , '..' ) ) ;
5252 } catch ( e ) {
53- // eslint-disable-next-line no-console
54- console . error (
55- `Unable to locate git workspace root for ${ startPath } . Expected if ${ startPath } is not in a git repository.` ,
56- e ,
57- ) ;
53+ if ( atom . config . get ( 'github.reportCannotLocateWorkspaceError' ) ) {
54+ // eslint-disable-next-line no-console
55+ console . error (
56+ `Unable to locate git workspace root for ${ startPath } . Expected if ${ startPath } is not in a git repository.` ,
57+ e ,
58+ ) ;
59+ }
5860 return null ;
5961 }
6062 }
Original file line number Diff line number Diff line change 189189 "type" : " string" ,
190190 "default" : " " ,
191191 "description" : " Comma-separated list of email addresses to exclude from the co-author selection list"
192+ },
193+ "reportCannotLocateWorkspaceError" : {
194+ "type" : " boolean" ,
195+ "default" : " false" ,
196+ "description" : " Log an error to the console if a git repository cannot be located for the opened file "
192197 }
193198 },
194199 "deserializers" : {
You can’t perform that action at this time.
0 commit comments