Skip to content

Commit

Permalink
land: allow --yes to be used with other options (#444)
Browse files Browse the repository at this point in the history
--yes only worked with plain `git node land`, other options such as
--continue or --abort didn't accept --yes. Now it's possible to use
--yes with other options.
  • Loading branch information
renawolford6 committed Jun 27, 2020
1 parent 1b25787 commit b65bad0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions components/git/land.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ function handler(argv) {

const provided = [];
for (const type of Object.keys(landOptions)) {
if (type === 'yes') continue; // --yes is not an action
if (argv[type]) {
provided.push(type);
}
Expand Down Expand Up @@ -134,6 +135,9 @@ async function main(state, argv, cli, req, dir) {
return;
}

if (argv.yes) {
cli.setAssumeYes();
}
try {
session.restore();
} catch (err) { // JSON error?
Expand Down

0 comments on commit b65bad0

Please sign in to comment.