Skip to content

Commit b1dff6d

Browse files
committed
🐛 QD-13130 Trim whitespaces on product code from flavour file
1 parent fb225d8 commit b1dff6d

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

platform/commoncontext/analyzer_cli_options_test.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,17 @@ func TestNativePathAnalyzerParams(t *testing.T) {
129129
makeDistFlavourFile(distPath, product.JvmCommunityLinter.ProductCode)
130130
},
131131
},
132+
{
133+
"Pass through dist & flavour with trailing newline",
134+
distPath,
135+
"",
136+
distPath,
137+
product.JvmCommunityLinter,
138+
false,
139+
func(t *testing.T) {
140+
makeDistFlavourFile(distPath, product.JvmCommunityLinter.ProductCode+"\n")
141+
},
142+
},
132143
{
133144
"Pass through dist & flavour - unknown dist",
134145
distPath,

platform/product/product_info.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ func ReadDistFlavour(ideDir string) string {
445445
if err != nil {
446446
return ""
447447
}
448-
return string(productFlavour)
448+
return strings.TrimSpace(string(productFlavour))
449449
}
450450

451451
func findIde(dir string) string {

0 commit comments

Comments
 (0)