fix the new command

This commit is contained in:
Yanick Champoux 2021-11-01 10:27:55 -04:00
parent 7c4e6c96c6
commit e2b99ba887
2 changed files with 5 additions and 5 deletions

View File

@ -38,7 +38,7 @@ async function getBaseBranch(branch) {
module.exports = async (yargs) => { module.exports = async (yargs) => {
// await checkWorkspaceClean(); await checkWorkspaceClean();
const branch = yargs.branch; const branch = yargs.branch;
@ -59,7 +59,5 @@ module.exports = async (yargs) => {
await Git().addConfig( `branch.${branch}.mikado-base`, base ); await Git().addConfig( `branch.${branch}.mikado-base`, base );
await Git().addConfig( `branch.${branch}.mikado-upstream`, upstream ); await Git().addConfig( `branch.${branch}.mikado-upstream`, upstream );
await Git().addConfig( `branch.${upstream}.mikado-dependency`, branch, true );
report.success('done!'); report.success('done!');
} }

View File

@ -1,8 +1,10 @@
const yargs = require("yargs"); const yargs = require("yargs");
const new_branch = require("./commands/new_branch");
const new = require("./commands/new");
const status = require("./commands/status"); const status = require("./commands/status");
const done = require("./commands/done"); const done = require("./commands/done");
const upstream = require("./commands/upstream"); const upstream = require("./commands/upstream");
const { currentBranch } = require('./utils'); const { currentBranch } = require('./utils');
currentBranch().then( currentBranch().then(
@ -64,7 +66,7 @@ yargs
}) })
.demandOption(["branch"]); .demandOption(["branch"]);
}, },
new_branch new
) )
.fail((msg, err, yargs) => { .fail((msg, err, yargs) => {
try { try {