Skip to content
Merged
Changes from 2 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
8 changes: 5 additions & 3 deletions components/git/land.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ async function main(state, argv, cli, dir) {
cli.warn(
'Failed to detect previous session. ' +
'please run `git node land --abort`');
process.exitCode ||= 1;
Comment thread
aduh95 marked this conversation as resolved.
Outdated
return;
}

Expand All @@ -197,10 +198,11 @@ async function main(state, argv, cli, dir) {
cli.warn(
'Previous `git node land` session for ' +
`${session.pullName} in progress.`);
cli.log('run `git node land --abort` before starting a new session');
return;
const response = await cli.prompt('Do you want to abort it?', { defaultAnswer: false });
if (!response) throw new Error('Please run `git node land --abort`');
await session.abort();
session = new LandingSession(cli, req, dir, argv);
}
session = new LandingSession(cli, req, dir, argv);
const metadata = await getMetadata(session.argv, argv.skipRefs, cli);
if (argv.backport) {
const split = metadata.metadata.split('\n')[0];
Expand Down
Loading