Skip to content

Commit ea17768

Browse files
tawseefnabitawseefnabi
andauthored
feat(git-node): enhance remote configuration error message (#965)
- Suggest 'upstream' as the default remote name - Clarify the need to add the remote manually for security - Provide a clear example of the git remote add command Co-authored-by: tawseefnabi <tawseefnabi9@gamil.com>
1 parent 825f3d0 commit ea17768

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

lib/session.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -382,12 +382,15 @@ export default class Session {
382382
cli.setExitCode(1);
383383
}
384384
if (!upstream) {
385-
cli.warn('You have not told git-node the remote you want to sync with.');
385+
cli.warn('You need to configure the remote repository for Node.js core.');
386386
cli.separator();
387387
cli.info(
388-
'For example, if your remote pointing to nodejs/node is' +
389-
' `remote-upstream`, you can run:\n\n' +
390-
' $ ncu-config set upstream remote-upstream');
388+
'1. First, add the Node.js core repository as a remote (if not already added):\n' +
389+
' $ git remote add upstream https://github.com/nodejs/node.git\n\n' +
390+
'2. Then, tell git-node to use this remote for syncing:\n' +
391+
' $ ncu-config set upstream upstream\n\n' +
392+
'Note: Using "upstream" is recommended, but you can use any remote name.\n' +
393+
'For security reasons, you need to add the remote manually.');
391394
cli.separator();
392395
cli.setExitCode(1);
393396
}

0 commit comments

Comments
 (0)