UNPKG

lerna

Version:

Lerna is a fast, modern build system for managing and publishing multiple JavaScript/TypeScript packages from the same repository

26 lines (23 loc) 750 B
import { exec, npmlog_default } from "./chunk-WC2B4V4E.js"; // libs/commands/version/src/lib/git-push.ts function gitPush(remote, branch, opts) { npmlog_default.silly("gitPush", remote, branch); return exec("git", ["push", "--follow-tags", "--no-verify", "--atomic", remote, branch], opts).catch((error) => { if (/atomic/.test(error.stderr) || process.env["GIT_REDIRECT_STDERR"] === "2>&1" && /atomic/.test(error.stdout)) { npmlog_default.warn("gitPush", error.stderr); npmlog_default.info("gitPush", "--atomic failed, attempting non-atomic push"); return exec( "git", ["push", "--follow-tags", "--no-verify", remote, branch], opts ); } throw error; }); } export { gitPush };