fmt.Sprint

Signed-off-by: Richard Jones <richard@dagger.io>
This commit is contained in:
Richard Jones 2021-12-22 17:01:46 -07:00
parent 643d93c35d
commit 40e1c9d4fa
No known key found for this signature in database
GPG Key ID: CFB3A382EB166F4C

View File

@ -2,6 +2,7 @@ package task
import ( import (
"context" "context"
"fmt"
"io/fs" "io/fs"
"net/url" "net/url"
@ -54,11 +55,11 @@ func (c httpFetchTask) Run(ctx context.Context, pctx *plancontext.Context, s sol
httpOpts = append(httpOpts, llb.Filename(httpFetch.Dest)) httpOpts = append(httpOpts, llb.Filename(httpFetch.Dest))
} }
if httpFetch.Permissions != 0 { if httpFetch.Permissions != 0 {
lg.Debug().Str("permissions", string(httpFetch.Permissions)).Msg("adding http option") lg.Debug().Str("permissions", fmt.Sprint(httpFetch.Permissions)).Msg("adding http option")
httpOpts = append(httpOpts, llb.Chmod(fs.FileMode(httpFetch.Permissions))) httpOpts = append(httpOpts, llb.Chmod(fs.FileMode(httpFetch.Permissions)))
} }
if httpFetch.UID != 0 && httpFetch.GID != 0 { if httpFetch.UID != 0 && httpFetch.GID != 0 {
lg.Debug().Str("uid", string(httpFetch.UID)).Str("gid", string(httpFetch.GID)).Msg("adding http option") lg.Debug().Str("uid", fmt.Sprint(httpFetch.UID)).Str("gid", fmt.Sprint(httpFetch.GID)).Msg("adding http option")
httpOpts = append(httpOpts, llb.Chown(httpFetch.UID, httpFetch.GID)) httpOpts = append(httpOpts, llb.Chown(httpFetch.UID, httpFetch.GID))
} }