Add newline to 'ipfs init' error message
rht committed
May 30, 2015 at 13:12 UTC
f5d5095b1b95349c45fe6cc20afdfe8dde7e5ee8
2 files changed
+3
-2
repo/fsrepo/fsrepo.go
+1
-1
@@ -52,7 +52,7 @@ type NoRepoError struct {
52
var _ error = NoRepoError{}
53
54
func (err NoRepoError) Error() string {
55
- return fmt.Sprintf("no ipfs repo found in %s. please run: ipfs init", err.Path)
55
+ return fmt.Sprintf("no ipfs repo found in %s.\nplease run: ipfs init", err.Path)
56
}
57
58
const (
test/sharness/t0020-init.sh
+2
-1
@@ -32,7 +32,8 @@ test_expect_success "ipfs cat fails" '
32
'
33
34
test_expect_success "ipfs cat no repo message looks good" '
35
- echo "Error: no ipfs repo found in $IPFS_PATH. please run: ipfs init" > cat_fail_exp &&
35
+ echo "Error: no ipfs repo found in $IPFS_PATH." > cat_fail_exp &&
36
+ echo "please run: ipfs init" >> cat_fail_exp &&
37
test_cmp cat_fail_exp cat_fail_out
38
'
39