aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/monorepo-scripts/src/utils/utils.ts14
1 files changed, 8 insertions, 6 deletions
diff --git a/packages/monorepo-scripts/src/utils/utils.ts b/packages/monorepo-scripts/src/utils/utils.ts
index 7019f9241..4d3e2d709 100644
--- a/packages/monorepo-scripts/src/utils/utils.ts
+++ b/packages/monorepo-scripts/src/utils/utils.ts
@@ -103,20 +103,22 @@ export const utils = {
return tagVersionByPackageName;
},
async removeLocalTagAsync(tagName: string): Promise<void> {
- const result = await execAsync(`git tag -d ${tagName}`, {
+ try {
+ await execAsync(`git tag -d ${tagName}`, {
cwd: constants.monorepoRootPath,
});
- if (!_.isEmpty(result.stderr)) {
- throw new Error(`Failed to delete local git tag. Got err: ${result.stderr}`);
+ } catch (err) {
+ throw new Error(`Failed to delete local git tag. Got err: ${err}`);
}
this.log(`Removed local tag: ${tagName}`);
},
async removeRemoteTagAsync(tagName: string): Promise<void> {
- const result = await execAsync(`git push origin ${tagName}`, {
+ try {
+ await execAsync(`git push origin ${tagName}`, {
cwd: constants.monorepoRootPath,
});
- if (!_.isEmpty(result.stderr)) {
- throw new Error(`Failed to delete remote git tag. Got err: ${result.stderr}`);
+ } catch (err) {
+ throw new Error(`Failed to delete remote git tag. Got err: ${err}`);
}
this.log(`Removed remote tag: ${tagName}`);
},