We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c0896c6 commit 83d299eCopy full SHA for 83d299e
internal/pgbouncer/reconcile.go
@@ -150,8 +150,13 @@ func Pod(
150
}
151
152
mkdirCommand := ""
153
- if logfile != "" && filepath.Dir(logfile) != "/tmp" {
154
- mkdirCommand = shell.MakeDirectories("/tmp", filepath.Dir(logfile)) + "; "
+ // filepath.Dir will return an "" when given an ""
+ logPath := filepath.Dir(logfile)
155
+ // If the logpath is `/tmp`, we don't need to worry about creating/chmoding it.
156
+ // Otherwise, use `MakeDirectories` to create/chmod that specific directory,
157
+ // without worrying about parent directories.
158
+ if logfile != "" && logPath != "/tmp" {
159
+ mkdirCommand = shell.MakeDirectories(logPath, logPath) + "; "
160
161
162
container := corev1.Container{
0 commit comments