Skip to content

Commit 2d4de42

Browse files
Update plugin.go
1 parent 05cfe14 commit 2d4de42

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

plugin.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,13 @@ func (p Plugin) Exec() error {
474474
params := strings.Split(p.Config.CustomJvmParams, ",")
475475
args = append(args, params...)
476476
}
477+
478+
if len(p.Config.SonarOPS) >= 1 {
479+
existingOpts := os.Getenv("SONAR_SCANNER_OPTS")
480+
newOpts := existingOpts + " " + p.Config.SonarOPS
481+
os.Setenv("SONAR_SCANNER_OPTS", newOpts)
482+
}
483+
477484
taskFilePath := ".scannerwork/report-task.txt"
478485

479486
if len(p.Config.Workspace) >= 1 {

0 commit comments

Comments
 (0)