mirror of
https://github.com/aquasecurity/trivy.git
synced 2026-02-15 21:23:17 +08:00
chore: add modernize tool integration for code modernization (#9251)
Co-authored-by: knqyf263 <knqyf263@users.noreply.github.com>
This commit is contained in:
@@ -29,8 +29,8 @@ func evaluateVariable(s string, props map[string]string, seenProps []string) str
|
||||
|
||||
// env.X: https://maven.apache.org/pom.html#Properties
|
||||
// e.g. env.PATH
|
||||
if strings.HasPrefix(m[1], "env.") {
|
||||
newValue = os.Getenv(strings.TrimPrefix(m[1], "env."))
|
||||
if after, ok := strings.CutPrefix(m[1], "env."); ok {
|
||||
newValue = os.Getenv(after)
|
||||
} else {
|
||||
// <properties> might include another property.
|
||||
// e.g. <animal.sniffer.skip>${skipTests}</animal.sniffer.skip>
|
||||
|
||||
Reference in New Issue
Block a user