Skip to content

Commit

Permalink
Merge pull request #10211 from OfficeDev/yuqzho/main-suffix
Browse files Browse the repository at this point in the history
fix: update suffix placeholder
  • Loading branch information
MSFT-yiz authored Oct 25, 2023
2 parents 9a6e435 + 64b6672 commit 5528353
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -411,13 +411,13 @@ function validateTeamsManifestLength(
const nameFullLimit = 100;
const descriptionShortLimit = 80;
const descriptionFullLimit = 4000;
const envPlaceholder = "${{TEAMSFX_ENV}}";
const appnameSuffixPlaceholder = "${{APP_NAME_SUFFIX}}";
const devEnv = "dev";
const resultWarnings = [];

// validate name
const shortNameLength = teamsManifest.name.short.includes(envPlaceholder)
? teamsManifest.name.short.length - envPlaceholder.length + devEnv.length
const shortNameLength = teamsManifest.name.short.includes(appnameSuffixPlaceholder)
? teamsManifest.name.short.length - appnameSuffixPlaceholder.length + devEnv.length
: teamsManifest.name.short.length;
if (shortNameLength > nameShortLimit) {
resultWarnings.push(formatLengthExceedingErrorMessage("/name/short", nameShortLimit));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ describe("generateScaffoldingSummary", () => {
});

it("no warnings if exceeding length with placeholder in short name", () => {
const shortName = "testdebug09051-${{TEAMSFX_ENV}}";
const shortName = "testdebug09051${{APP_NAME_SUFFIX}}";
const res = generateScaffoldingSummary(
[],
{
Expand Down

0 comments on commit 5528353

Please sign in to comment.