@ucdjs/release-scripts 0.1.0-beta.37 → 0.1.0-beta.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +4 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -474,14 +474,16 @@ async function createBranch(branch, base, workspaceRoot) {
|
|
|
474
474
|
async function checkoutBranch(branch, workspaceRoot) {
|
|
475
475
|
try {
|
|
476
476
|
logger.info(`Switching to branch: ${farver.green(branch)}`);
|
|
477
|
-
const
|
|
477
|
+
const output = (await run("git", ["checkout", branch], { nodeOptions: {
|
|
478
478
|
cwd: workspaceRoot,
|
|
479
479
|
stdio: "pipe"
|
|
480
|
-
} })).stderr.trim()
|
|
480
|
+
} })).stderr.trim();
|
|
481
|
+
const match = output.match(/Switched to branch '(.+)'/);
|
|
481
482
|
if (match && match[1] === branch) {
|
|
482
483
|
logger.info(`Successfully switched to branch: ${farver.green(branch)}`);
|
|
483
484
|
return ok(true);
|
|
484
485
|
}
|
|
486
|
+
console.warn(`Unexpected git checkout output: ${output}`);
|
|
485
487
|
return ok(false);
|
|
486
488
|
} catch (error) {
|
|
487
489
|
const gitError = toGitError("checkoutBranch", error);
|