storageminer: separate env var for storage repo

This commit is contained in:
Łukasz Magiera 2019-07-19 01:44:59 +02:00
parent a5441f8d17
commit 486598ef53
2 changed files with 8 additions and 1 deletions

View File

@ -31,7 +31,7 @@ func main() {
}, },
&cli.StringFlag{ &cli.StringFlag{
Name: "storagerepo", Name: "storagerepo",
EnvVars: []string{"LOTUS_PATH"}, EnvVars: []string{"LOTUS_STORAGE_PATH"},
Hidden: true, Hidden: true,
Value: "~/.lotusstorage", // TODO: Consider XDG_DATA_HOME Value: "~/.lotusstorage", // TODO: Consider XDG_DATA_HOME
}, },

View File

@ -9,6 +9,13 @@ import (
var RunCmd = &cli.Command{ var RunCmd = &cli.Command{
Name: "run", Name: "run",
Usage: "Start a lotus storage miner process", Usage: "Start a lotus storage miner process",
Flags: []cli.Flag{
&cli.StringFlag{
Name: "storagerepo",
EnvVars: []string{"LOTUS_STORAGE_PATH"},
Value: "~/.lotusstorage", // TODO: Consider XDG_DATA_HOME
},
},
Action: func(cctx *cli.Context) error { Action: func(cctx *cli.Context) error {
api, err := lcli.GetAPI(cctx) api, err := lcli.GetAPI(cctx)
if err != nil { if err != nil {