Skip to content
This repository was archived by the owner on Mar 18, 2024. It is now read-only.

Commit 4665c1d

Browse files
author
azlam-abdulsalam
committed
fix(publish): fix publish adding an additional '@'
Changes in @salesforce/command has led to ignoring the removal of '@' symbol added by a user during the parsing of the flag. This has led subsequent code to add '@' again, as '@' is mandatory for scopde package and users may ignore adding '@' to the scope. This was clearly the established behaviour with publish command. This fix reintroduces previous behaviours issue not created in github, but refered in slack as https://dxatscale.slack.com/archives/CN9N54GF5/p1670321226990929
1 parent 21731f1 commit 4665c1d

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

packages/sfpowerscripts-cli/package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/sfpowerscripts-cli/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@dxatscale/sfpowerscripts",
33
"description": "DX@Scale Toolkit",
4-
"version": "20.2.5",
4+
"version": "20.2.6",
55
"author": "dxatscale",
66
"release": "November 22",
77
"bin": {

packages/sfpowerscripts-cli/src/commands/sfpowerscripts/orchestrator/publish.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,12 @@ export default class Promote extends SfpowerscriptsCommand {
281281
// NPM does not accept packages with uppercase characters
282282
let name: string = sfpPackage.packageName.toLowerCase() + '_sfpowerscripts_artifact';
283283

284-
if (this.flags.scope) name = `@${this.flags.scope.toLowerCase()}/` + name;
284+
//Check whether the user has already passed in @
285+
286+
if (this.flags.scope) {
287+
let scope: string = this.flags.scope.replace(/@/g, '').toLowerCase();
288+
name = `@${scope}/` + name;
289+
}
285290

286291
let packageJson = {
287292
name: name,

0 commit comments

Comments
 (0)