Skip to content

Commit

Permalink
fix(rpc): cli error instead of daemon println
Browse files Browse the repository at this point in the history
probably safer to error here, than printing line - if command was
executed over http it might be printed on the server, or break cli tools
that expect specific stdout rather than this line
  • Loading branch information
lidel committed Aug 13, 2024
1 parent def7598 commit 65ef19c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/commands/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ See 'dag export' and 'dag import' for more information.
if mtime != 0 {
opts = append(opts, options.Unixfs.Mtime(mtime, uint32(mtimeNsecs)))
} else if mtimeNsecs != 0 {
fmt.Println("option", mtimeNsecsOptionName, "ignored as no valid", mtimeOptionName, "value provided")
return fmt.Errorf("option %q requires %q to be provided as well", mtimeNsecsOptionName, mtimeOptionName)
}

if cidVerSet {
Expand Down

0 comments on commit 65ef19c

Please sign in to comment.