Skip to content

Commit

Permalink
Hotfix for props
Browse files Browse the repository at this point in the history
  • Loading branch information
krystian-panek-vmltech committed Dec 1, 2021
1 parent 572f499 commit 2c3abe4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class CommonPlugin : Plugin<Project> {
*/
private fun checkPathEnabled(project: Project): Boolean {
val envVars = listOf("JENKINS_HOME")
if (envVars.any { System.getenv(it).isNotBlank() }) {
if (envVars.any { (System.getenv(it) ?: "").isNotBlank() }) {
return false
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ class PropertyParser(anyProject: Project) {
return project.property(name).toString()
}

val systemValue = System.getProperty(name)
val systemValue: String? = System.getProperty(name)
if (systemValue != null) {
return systemValue
}

val envValue = System.getenv(name)
val envValue: String? = System.getenv(name)
if (envValue != null) {
return envValue
}
Expand Down

0 comments on commit 2c3abe4

Please sign in to comment.