Skip to content

Commit d37f475

Browse files
authored
Merge pull request microsoft#1517 from chaseholland/master
[rush-lib] Fixing issue in publishing when using --pack and --apply-git-tags-on-pack
2 parents a8d3f27 + afe5bfa commit d37f475

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

apps/rush-lib/src/cli/actions/PublishAction.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,11 @@ export class PublishAction extends BaseRushAction {
327327
return;
328328
}
329329

330+
// Do not tag packages that already exist. This will fail with a fatal error.
331+
if (this._packageExists(packageConfig)) {
332+
return;
333+
}
334+
330335
git.addTag(!!this._publish.value && !this._registryUrl.value, packageName, packageConfig.packageJson.version);
331336
updated = true;
332337
};
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"changes": [
3+
{
4+
"comment": "Fix an issue where Rush attempted to add Git tags for packages that had already been published when the publish command is run with the --pack and --apply-git-tags-on-pack flags. This caused a fatal error when tags already existed.",
5+
"packageName": "@microsoft/rush",
6+
"type": "none"
7+
}
8+
],
9+
"packageName": "@microsoft/rush",
10+
"email": "chaseholland@users.noreply.github.com"
11+
}

0 commit comments

Comments
 (0)