File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -382,10 +382,14 @@ export default class Session {
382382 cli . setExitCode ( 1 ) ;
383383 }
384384 if ( ! upstream ) {
385- cli . warn ( 'You need to configure the remote repository for Node.js core .' ) ;
385+ cli . warn ( 'You have not told git-node what remote name you are trying to land commits on .' ) ;
386386 cli . separator ( ) ;
387- cli . info (
388- '1. First, add the Node.js core repository as a remote (if not already added):\n' +
387+ const remoteName = runSync ( 'git' , [ 'remote' , '-v' ] )
388+ . match ( / ^ ( \S + ) \s + (?: h t t p s : \/ \/ g i t h u b \. c o m \/ | g i t @ g i t h u b \. c o m : ) n o d e j s \/ n o d e \. g i t \( \S + \) \r ? $ / m) ?. [ 1 ] ;
389+ cli . info ( remoteName
390+ ? `You likely want to run the following:\n\n $ ncu-config set upstream ${ remoteName } `
391+ : 'The expected repository does not seem to appear in your local config.\n' +
392+ '1. First, add the Node.js core repository as a remote:\n' +
389393 ' $ git remote add upstream https://github.com/nodejs/node.git\n\n' +
390394 '2. Then, tell git-node to use this remote for syncing:\n' +
391395 ' $ ncu-config set upstream upstream\n\n' +
You can’t perform that action at this time.
0 commit comments