Skip to content

Commit

Permalink
Wrap non-publish case in else block to clarify function flow
Browse files Browse the repository at this point in the history
Signed-off-by: Zander Mackie <zmackie@gmail.com>
  • Loading branch information
zmackie committed May 5, 2020
1 parent 00a01ca commit 6907768
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions internal/build/phases.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,22 +187,22 @@ func (l *Lifecycle) newExport(repoName, runImage string, publish bool, launchCac
)

return phaseFactory.New(configProvider), nil
}

args = append([]string{"-daemon", "-launch-cache", launchCacheDir}, args...)
binds = append(binds, fmt.Sprintf("%s:%s", launchCacheName, launchCacheDir))
} else {
args = append([]string{"-daemon", "-launch-cache", launchCacheDir}, args...)
binds = append(binds, fmt.Sprintf("%s:%s", launchCacheName, launchCacheDir))

configProvider := NewPhaseConfigProvider(
"exporter",
l,
WithDaemonAccess(),
WithArgs(
l.withLogLevel(args...)...,
),
WithBinds(binds...),
)
configProvider := NewPhaseConfigProvider(
"exporter",
l,
WithDaemonAccess(),
WithArgs(
l.withLogLevel(args...)...,
),
WithBinds(binds...),
)

return phaseFactory.New(configProvider), nil
return phaseFactory.New(configProvider), nil
}
}

func (l *Lifecycle) withLogLevel(args ...string) []string {
Expand Down

0 comments on commit 6907768

Please sign in to comment.