Skip to content

Commit

Permalink
fix: "invalid reference format" error by avoiding trailing underscore…
Browse files Browse the repository at this point in the history
… if nested name is not set (#461)
  • Loading branch information
jamesbassett authored Oct 17, 2024
1 parent ccd287f commit ce6f4e8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ abstract class ComposeSettings {
return customProjectName
}
else if (projectNamePrefix) {
return "${projectNamePrefix}_${nestedName}"
return nestedName ? "${projectNamePrefix}_${nestedName}" : projectNamePrefix
}
else {
return "${safeProjectNamePrefix}_${nestedName}"
return nestedName ? "${safeProjectNamePrefix}_${nestedName}" : safeProjectNamePrefix
}
}).map{ String projectName ->
// docker-compose project names must be lowercase
Expand Down

0 comments on commit ce6f4e8

Please sign in to comment.