Skip to content
Open
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
11 changes: 7 additions & 4 deletions lib/session.js
Original file line number Diff line number Diff line change
Expand Up @@ -382,12 +382,15 @@ export default class Session {
cli.setExitCode(1);
}
if (!upstream) {
cli.warn('You have not told git-node the remote you want to sync with.');
cli.warn('You need to configure the remote repository for Node.js core.');
cli.separator();
cli.info(
'For example, if your remote pointing to nodejs/node is' +
' `remote-upstream`, you can run:\n\n' +
' $ ncu-config set upstream remote-upstream');
'1. First, add the Node.js core repository as a remote (if not already added):\n' +
' $ git remote add upstream https://github.com/nodejs/node.git\n\n' +
Comment on lines +388 to +389
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we could simply run git remote -v to check whether it's been added, and only show that message if it hasn't.

'2. Then, tell git-node to use this remote for syncing:\n' +
' $ ncu-config set upstream upstream\n\n' +
'Note: Using "upstream" is recommended, but you can use any remote name.\n' +
'For security reasons, you need to add the remote manually.');
cli.separator();
cli.setExitCode(1);
}
Expand Down