1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-24 05:59:55 +08:00

Merge pull request #2242 from tomgg/issue1083

fix #1083: Append a newline to `ipfs id` output.
This commit is contained in:
Jeromy Johnson
2016-01-25 22:00:35 -08:00
2 changed files with 2 additions and 1 deletions

View File

@ -75,7 +75,7 @@ The resolver will give:
if !ok { if !ok {
return nil, util.ErrCast() return nil, util.ErrCast()
} }
return strings.NewReader(output.Path.String()), nil return strings.NewReader(output.Path.String() + "\n"), nil
}, },
}, },
Type: ResolvedPath{}, Type: ResolvedPath{},

View File

@ -133,6 +133,7 @@ ipfs id supports the format option for output with the following keys:
if err != nil { if err != nil {
return nil, err return nil, err
} }
marshaled = append(marshaled, byte('\n'))
return bytes.NewReader(marshaled), nil return bytes.NewReader(marshaled), nil
} }
}, },