diff --git a/deps/config/types.go b/deps/config/types.go index 7f5f2c979..56bf981cb 100644 --- a/deps/config/types.go +++ b/deps/config/types.go @@ -342,6 +342,11 @@ type CurioProvingConfig struct { // for decoding and encoding from/to TOML type Duration time.Duration +func (dur Duration) MarshalText() ([]byte, error) { + d := time.Duration(dur) + return []byte(d.String()), nil +} + // UnmarshalText implements interface for TOML decoding func (dur *Duration) UnmarshalText(text []byte) error { d, err := time.ParseDuration(string(text)) diff --git a/lib/fastparamfetch/paramfetch.go b/lib/fastparamfetch/paramfetch.go index 3a86d83dc..46e7290a3 100644 --- a/lib/fastparamfetch/paramfetch.go +++ b/lib/fastparamfetch/paramfetch.go @@ -307,7 +307,7 @@ func fetchWithAria2c(ctx context.Context, out, url string) error { return xerrors.New("aria2c not found in PATH") } - cmd := exec.CommandContext(ctx, aria2cPath, "--continue", "-x16", "-s16", "-dir", filepath.Dir(out), "-o", filepath.Base(out), url) + cmd := exec.CommandContext(ctx, aria2cPath, "--continue", "-x16", "-s16", "--dir", filepath.Dir(out), "-o", filepath.Base(out), url) cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr