Skip to content

Commit

Permalink
feat: setProjectName accepts null to fallback to Docker default Fixes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
augi committed Jul 1, 2022
1 parent 33cb671 commit c15bc18
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ abstract class ComposeExecutor implements BuildService<Parameters>, AutoCloseabl
}
}
finalArgs.addAll(parameters.useComposeFiles.get().collectMany { ['-f', it].asCollection() })
String pn = parameters.projectName.get()
String pn = parameters.projectName.getOrNull()
if (pn) {
finalArgs.addAll(['-p', pn])
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,8 @@ abstract class ComposeSettings {
protected Boolean customProjectNameSet
protected String safeProjectNamePrefix
void setProjectName(String customProjectName) {
if (customProjectName == null || customProjectName.isEmpty()) {
this.customProjectName = null
this.customProjectNameSet = false
} else {
this.customProjectName = customProjectName
this.customProjectNameSet = true
}
this.customProjectName = customProjectName
this.customProjectNameSet = true
}
private Provider<String> projectNameProvider
Provider<String> getProjectName() {
Expand Down

0 comments on commit c15bc18

Please sign in to comment.