提交 46f4b814 编写于 作者: T Theodore Kokkoris 提交者: Jingwen Owen Ou

Added noop for push

上级 196bbc24
package commands
import (
"fmt"
"os"
"strings"
"github.com/jingweno/gh/utils"
......@@ -33,8 +34,12 @@ func pushToEveryRemote (args *Args) {
for _, i := range remotes {
copyArgs := args
copyArgs.ReplaceParam(idx, i)
err := copyArgs.ToCmd().Exec()
utils.Check(err)
if !args.Noop {
err := copyArgs.ToCmd().Exec()
utils.Check(err)
} else {
fmt.Printf("it would run `git push %s`\n", strings.Join(copyArgs.Params, " "))
}
}
fixHelp(args)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册