Skip to content

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
  • Loading branch information
willscott committed Apr 5, 2021
1 parent 411c038 commit 0c5fb17
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions core/commands/dag/put.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,19 @@ func dagPut(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) e

icodec, ok := mc.Of(ienc)
if !ok {
if n, err := strconv.Atoi(ienc); err == nil {
icodec = mc.Code(n)
} else {
n, err := strconv.Atoi(ienc)
if err != nil {
return fmt.Errorf("%s is not a valid codec name", ienc)
}
icodec = mc.Code(n)
}
fcodec, ok := mc.Of(format)
if !ok {
if n, err := strconv.Atoi(format); err == nil {
fcodec = mc.Code(n)
} else {
n, err := strconv.Atoi(format)
if err != nil {
return fmt.Errorf("%s is not a valid codec name", format)
}
fcodec = mc.Code(n)
}

cidPrefix := cid.Prefix{
Expand Down
2 changes: 1 addition & 1 deletion test/sharness/t0051-object.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ test_object_cmd() {
'

test_expect_failure "'ipfs object put --inputenc=xml' output looks good" '
echo "added $HASH\n" >expected &&
echo "added $HASH" >expected &&
test_cmp expected actual
'

Expand Down

0 comments on commit 0c5fb17

Please sign in to comment.