Skip to content

Commit

Permalink
addressing #127, server requires postageBlockId to run
Browse files Browse the repository at this point in the history
  • Loading branch information
asabya committed Dec 13, 2021
1 parent 37171a2 commit 9305122
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions cmd/dfs/cmd/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"fmt"
"io/ioutil"
"net/http"
"os"
"strings"

dfs "github.com/fairdatasociety/fairOS-dfs"
Expand Down Expand Up @@ -48,9 +49,9 @@ var serverCmd = &cobra.Command{
can consume it.`,
Run: func(cmd *cobra.Command, args []string) {
if postageBlockId == "" {
_ = cmd.Help()
cmd.Help()
fmt.Println("\npostageBlockId is required to run server")
return
os.Exit(1)
}

var logger logging.Logger
Expand Down
2 changes: 1 addition & 1 deletion pkg/pod/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ var (
ErrInvalidDirectory = errors.New("invalid directory name")
ErrTooLongDirectoryName = errors.New("directory name too long")
ErrReadOnlyPod = errors.New("operation not permitted: read only pod")
ErrInvalidFile = errors.New("file dose not exist")
ErrInvalidFile = errors.New("file does not exist")
)

0 comments on commit 9305122

Please sign in to comment.