summaryrefslogtreecommitdiff
path: root/cmd/podman/images/build.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-12-23 04:47:54 -0500
committerGitHub <noreply@github.com>2020-12-23 04:47:54 -0500
commit06a6fd9f224adb8510e42691c261716ea2896ade (patch)
tree5a698612cbac29d6858b7815f181796872572e59 /cmd/podman/images/build.go
parentb41fa90a4c86df7fc8f14e814925dc5a330ddcf5 (diff)
parentd61887037df6b7a4449b49145cdfd7941ab2d874 (diff)
downloadpodman-06a6fd9f224adb8510e42691c261716ea2896ade.tar.gz
podman-06a6fd9f224adb8510e42691c261716ea2896ade.tar.bz2
podman-06a6fd9f224adb8510e42691c261716ea2896ade.zip
Merge pull request #8810 from hshiina/logfile
Fix podman build --logfile
Diffstat (limited to 'cmd/podman/images/build.go')
-rw-r--r--cmd/podman/images/build.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/podman/images/build.go b/cmd/podman/images/build.go
index fbea1e3d8..3aca104e3 100644
--- a/cmd/podman/images/build.go
+++ b/cmd/podman/images/build.go
@@ -221,7 +221,8 @@ func build(cmd *cobra.Command, args []string) error {
var logfile *os.File
if cmd.Flag("logfile").Changed {
- logfile, err := os.OpenFile(buildOpts.Logfile, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, 0600)
+ var err error
+ logfile, err = os.OpenFile(buildOpts.Logfile, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, 0600)
if err != nil {
return err
}