Skip to content

Commit 27341f8

Browse files
committed
fix: address issue with override param
Signed-off-by: tylerslaton <mtslaton1@gmail.com>
1 parent 2d161f5 commit 27341f8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/builtin/builtin.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ func SysDownload(ctx context.Context, env []string, input string) (_ string, err
381381
var params struct {
382382
URL string `json:"url,omitempty"`
383383
Location string `json:"location,omitempty"`
384-
Override bool `json:"override,omitempty"`
384+
Override string `json:"override,omitempty"`
385385
}
386386
if err := json.Unmarshal([]byte(input), &params); err != nil {
387387
return "", err
@@ -405,7 +405,7 @@ func SysDownload(ctx context.Context, env []string, input string) (_ string, err
405405
params.Location = f.Name()
406406
}
407407

408-
if checkExists && !params.Override {
408+
if checkExists && params.Override != "true" {
409409
if _, err := os.Stat(params.Location); err == nil {
410410
return "", fmt.Errorf("file %s already exists and can not be overwritten", params.Location)
411411
} else if err != nil && !errors.Is(err, fs.ErrNotExist) {

0 commit comments

Comments
 (0)