diff --git a/components/git/land.js b/components/git/land.js index 049f05c0..a9c2e6fa 100644 --- a/components/git/land.js +++ b/components/git/land.js @@ -129,9 +129,7 @@ module.exports = { async function main(state, argv, cli, req, dir) { let session = new LandingSession(cli, req, dir); - if (session.warnForMissing()) { - return; - } + if (state !== AMEND && state !== CONTINUE && session.warnForWrongBranch()) { return; } diff --git a/lib/session.js b/lib/session.js index 81087fa3..02d07c1a 100644 --- a/lib/session.js +++ b/lib/session.js @@ -25,6 +25,10 @@ class Session { const { upstream, owner, repo } = this; + if (this.warnForMissing()) { + throw new Error('Failed to create new session'); + } + const upstreamHref = runSync('git', [ 'config', '--get', `remote.${upstream}.url`]).trim(); diff --git a/lib/sync_session.js b/lib/sync_session.js index 5a3af892..5c092088 100644 --- a/lib/sync_session.js +++ b/lib/sync_session.js @@ -9,9 +9,6 @@ class SyncSession extends Session { } async sync() { - if (this.warnForMissing()) { - return; - } if (this.warnForWrongBranch()) { return; }