Skip to content

improve: enhance remote configuration error message #965

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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' +
'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