Merge pull request #10280 from filecoin-project/asr/fix-shed
fix: shed: default to LOTUS_PATH for repo
This commit is contained in:
commit
2dd2edc1d3
@ -456,7 +456,6 @@ var chainBalanceStateCmd = &cli.Command{
|
|||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "repo",
|
Name: "repo",
|
||||||
Value: "~/.lotus",
|
Value: "~/.lotus",
|
||||||
EnvVars: []string{"LOTUS_PATH"},
|
|
||||||
},
|
},
|
||||||
&cli.BoolFlag{
|
&cli.BoolFlag{
|
||||||
Name: "miner-info",
|
Name: "miner-info",
|
||||||
@ -680,7 +679,6 @@ var chainPledgeCmd = &cli.Command{
|
|||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "repo",
|
Name: "repo",
|
||||||
Value: "~/.lotus",
|
Value: "~/.lotus",
|
||||||
EnvVars: []string{"LOTUS_PATH"},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
ArgsUsage: "[stateroot epoch]",
|
ArgsUsage: "[stateroot epoch]",
|
||||||
|
@ -41,11 +41,6 @@ var datastoreListCmd = &cli.Command{
|
|||||||
Name: "list",
|
Name: "list",
|
||||||
Description: "list datastore keys",
|
Description: "list datastore keys",
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
&cli.StringFlag{
|
|
||||||
Name: "repo",
|
|
||||||
Value: "~/.lotus",
|
|
||||||
EnvVars: []string{"LOTUS_PATH"},
|
|
||||||
},
|
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "repo-type",
|
Name: "repo-type",
|
||||||
Usage: "node type (FullNode, StorageMiner, Worker, Wallet)",
|
Usage: "node type (FullNode, StorageMiner, Worker, Wallet)",
|
||||||
@ -115,11 +110,6 @@ var datastoreGetCmd = &cli.Command{
|
|||||||
Name: "get",
|
Name: "get",
|
||||||
Description: "list datastore keys",
|
Description: "list datastore keys",
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
&cli.StringFlag{
|
|
||||||
Name: "repo",
|
|
||||||
Value: "~/.lotus",
|
|
||||||
EnvVars: []string{"LOTUS_PATH"},
|
|
||||||
},
|
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "repo-type",
|
Name: "repo-type",
|
||||||
Usage: "node type (FullNode, StorageMiner, Worker, Wallet)",
|
Usage: "node type (FullNode, StorageMiner, Worker, Wallet)",
|
||||||
@ -133,7 +123,7 @@ var datastoreGetCmd = &cli.Command{
|
|||||||
},
|
},
|
||||||
ArgsUsage: "[namespace key]",
|
ArgsUsage: "[namespace key]",
|
||||||
Action: func(cctx *cli.Context) error {
|
Action: func(cctx *cli.Context) error {
|
||||||
_ = logging.SetLogLevel("badger", "ERROR")
|
logging.SetLogLevel("badger", "ERROR") // nolint:errcheck
|
||||||
|
|
||||||
r, err := repo.NewFS(cctx.String("repo"))
|
r, err := repo.NewFS(cctx.String("repo"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -26,7 +26,6 @@ var dealLabelCmd = &cli.Command{
|
|||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "repo",
|
Name: "repo",
|
||||||
Value: "~/.lotus",
|
Value: "~/.lotus",
|
||||||
EnvVars: []string{"LOTUS_PATH"},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(cctx *cli.Context) error {
|
Action: func(cctx *cli.Context) error {
|
||||||
|
@ -35,7 +35,6 @@ var diffMinerStates = &cli.Command{
|
|||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "repo",
|
Name: "repo",
|
||||||
Value: "~/.lotus",
|
Value: "~/.lotus",
|
||||||
EnvVars: []string{"LOTUS_PATH"},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(cctx *cli.Context) error {
|
Action: func(cctx *cli.Context) error {
|
||||||
|
@ -37,7 +37,6 @@ var exportCarCmd = &cli.Command{
|
|||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "repo",
|
Name: "repo",
|
||||||
Value: "~/.lotus",
|
Value: "~/.lotus",
|
||||||
EnvVars: []string{"LOTUS_PATH"},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
ArgsUsage: "[outfile] [root cid]",
|
ArgsUsage: "[outfile] [root cid]",
|
||||||
|
@ -44,7 +44,6 @@ var exportChainCmd = &cli.Command{
|
|||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "repo",
|
Name: "repo",
|
||||||
Value: "~/.lotus",
|
Value: "~/.lotus",
|
||||||
EnvVars: []string{"LOTUS_PATH"},
|
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "tipset",
|
Name: "tipset",
|
||||||
@ -149,7 +148,6 @@ var exportRawCmd = &cli.Command{
|
|||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "repo",
|
Name: "repo",
|
||||||
Value: "~/.lotus",
|
Value: "~/.lotus",
|
||||||
EnvVars: []string{"LOTUS_PATH"},
|
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "car-size",
|
Name: "car-size",
|
||||||
|
@ -58,6 +58,12 @@ var fip36PollCmd = &cli.Command{
|
|||||||
Name: "fip36poll",
|
Name: "fip36poll",
|
||||||
Usage: "Process the FIP0036 FilPoll result",
|
Usage: "Process the FIP0036 FilPoll result",
|
||||||
ArgsUsage: "[state root, votes]",
|
ArgsUsage: "[state root, votes]",
|
||||||
|
Flags: []cli.Flag{
|
||||||
|
&cli.StringFlag{
|
||||||
|
Name: "repo",
|
||||||
|
Value: "~/.lotus",
|
||||||
|
},
|
||||||
|
},
|
||||||
Subcommands: []*cli.Command{
|
Subcommands: []*cli.Command{
|
||||||
finalResultCmd,
|
finalResultCmd,
|
||||||
},
|
},
|
||||||
@ -71,7 +77,6 @@ var finalResultCmd = &cli.Command{
|
|||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "repo",
|
Name: "repo",
|
||||||
Value: "~/.lotus",
|
Value: "~/.lotus",
|
||||||
EnvVars: []string{"LOTUS_PATH"},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -44,7 +44,6 @@ var gasTraceCmd = &cli.Command{
|
|||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "repo",
|
Name: "repo",
|
||||||
Value: "~/.lotus",
|
Value: "~/.lotus",
|
||||||
EnvVars: []string{"LOTUS_PATH"},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(cctx *cli.Context) error {
|
Action: func(cctx *cli.Context) error {
|
||||||
@ -149,7 +148,6 @@ var replayOfflineCmd = &cli.Command{
|
|||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "repo",
|
Name: "repo",
|
||||||
Value: "~/.lotus",
|
Value: "~/.lotus",
|
||||||
EnvVars: []string{"LOTUS_PATH"},
|
|
||||||
},
|
},
|
||||||
&cli.Int64Flag{
|
&cli.Int64Flag{
|
||||||
Name: "lookback-limit",
|
Name: "lookback-limit",
|
||||||
|
@ -19,13 +19,6 @@ import (
|
|||||||
var importCarCmd = &cli.Command{
|
var importCarCmd = &cli.Command{
|
||||||
Name: "import-car",
|
Name: "import-car",
|
||||||
Description: "Import a car file into node chain blockstore",
|
Description: "Import a car file into node chain blockstore",
|
||||||
Flags: []cli.Flag{
|
|
||||||
&cli.StringFlag{
|
|
||||||
Name: "repo",
|
|
||||||
Value: "~/.lotus",
|
|
||||||
EnvVars: []string{"LOTUS_PATH"},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
Action: func(cctx *cli.Context) error {
|
Action: func(cctx *cli.Context) error {
|
||||||
r, err := repo.NewFS(cctx.String("repo"))
|
r, err := repo.NewFS(cctx.String("repo"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -103,13 +96,6 @@ var importCarCmd = &cli.Command{
|
|||||||
var importObjectCmd = &cli.Command{
|
var importObjectCmd = &cli.Command{
|
||||||
Name: "import-obj",
|
Name: "import-obj",
|
||||||
Usage: "import a raw ipld object into your datastore",
|
Usage: "import a raw ipld object into your datastore",
|
||||||
Flags: []cli.Flag{
|
|
||||||
&cli.StringFlag{
|
|
||||||
Name: "repo",
|
|
||||||
Value: "~/.lotus",
|
|
||||||
EnvVars: []string{"LOTUS_PATH"},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
Action: func(cctx *cli.Context) error {
|
Action: func(cctx *cli.Context) error {
|
||||||
r, err := repo.NewFS(cctx.String("repo"))
|
r, err := repo.NewFS(cctx.String("repo"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -37,7 +37,6 @@ var invariantsCmd = &cli.Command{
|
|||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "repo",
|
Name: "repo",
|
||||||
Value: "~/.lotus",
|
Value: "~/.lotus",
|
||||||
EnvVars: []string{"LOTUS_PATH"},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(cctx *cli.Context) error {
|
Action: func(cctx *cli.Context) error {
|
||||||
|
@ -146,14 +146,9 @@ var keyinfoImportCmd = &cli.Command{
|
|||||||
Examples
|
Examples
|
||||||
|
|
||||||
env LOTUS_PATH=/var/lib/lotus lotus-shed keyinfo import libp2p-host.keyinfo`,
|
env LOTUS_PATH=/var/lib/lotus lotus-shed keyinfo import libp2p-host.keyinfo`,
|
||||||
Flags: []cli.Flag{
|
|
||||||
&cli.StringFlag{
|
|
||||||
Name: "repo",
|
|
||||||
Value: "~/.lotus",
|
|
||||||
EnvVars: []string{"LOTUS_PATH"},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
Action: func(cctx *cli.Context) error {
|
Action: func(cctx *cli.Context) error {
|
||||||
|
flagRepo := cctx.String("repo")
|
||||||
|
|
||||||
var input io.Reader
|
var input io.Reader
|
||||||
if cctx.NArg() == 0 {
|
if cctx.NArg() == 0 {
|
||||||
input = os.Stdin
|
input = os.Stdin
|
||||||
@ -182,7 +177,7 @@ var keyinfoImportCmd = &cli.Command{
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
fsrepo, err := repo.NewFS(cctx.String("repo"))
|
fsrepo, err := repo.NewFS(flagRepo)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
logging "github.com/ipfs/go-log/v2"
|
logging "github.com/ipfs/go-log/v2"
|
||||||
@ -88,6 +89,19 @@ func main() {
|
|||||||
Version: build.UserVersion(),
|
Version: build.UserVersion(),
|
||||||
Commands: local,
|
Commands: local,
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
|
&cli.StringFlag{
|
||||||
|
Name: "repo",
|
||||||
|
EnvVars: []string{"LOTUS_PATH"},
|
||||||
|
Hidden: true,
|
||||||
|
Value: "~/.lotus", // TODO: Consider XDG_DATA_HOME
|
||||||
|
},
|
||||||
|
&cli.StringFlag{
|
||||||
|
Name: "miner-repo",
|
||||||
|
Aliases: []string{"storagerepo"},
|
||||||
|
EnvVars: []string{"LOTUS_MINER_PATH", "LOTUS_STORAGE_PATH"},
|
||||||
|
Value: "~/.lotusminer", // TODO: Consider XDG_DATA_HOME
|
||||||
|
Usage: fmt.Sprintf("Specify miner repo path. flag storagerepo and env LOTUS_STORAGE_PATH are DEPRECATION, will REMOVE SOON"),
|
||||||
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "log-level",
|
Name: "log-level",
|
||||||
Value: "info",
|
Value: "info",
|
||||||
|
@ -125,8 +125,7 @@ var marketExportDatastoreCmd = &cli.Command{
|
|||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "repo",
|
Name: "repo",
|
||||||
Value: "~/.lotus",
|
Usage: "path to the repo",
|
||||||
EnvVars: []string{"LOTUS_PATH"},
|
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "backup-dir",
|
Name: "backup-dir",
|
||||||
@ -243,8 +242,7 @@ var marketImportDatastoreCmd = &cli.Command{
|
|||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "repo",
|
Name: "repo",
|
||||||
Value: "~/.lotus",
|
Usage: "path to the repo",
|
||||||
EnvVars: []string{"LOTUS_PATH"},
|
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "backup-path",
|
Name: "backup-path",
|
||||||
|
@ -56,7 +56,6 @@ var migrationsCmd = &cli.Command{
|
|||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "repo",
|
Name: "repo",
|
||||||
Value: "~/.lotus",
|
Value: "~/.lotus",
|
||||||
EnvVars: []string{"LOTUS_PATH"},
|
|
||||||
},
|
},
|
||||||
&cli.BoolFlag{
|
&cli.BoolFlag{
|
||||||
Name: "skip-pre-migration",
|
Name: "skip-pre-migration",
|
||||||
|
@ -26,12 +26,10 @@ import (
|
|||||||
|
|
||||||
var minerPeeridCmd = &cli.Command{
|
var minerPeeridCmd = &cli.Command{
|
||||||
Name: "miner-peerid",
|
Name: "miner-peerid",
|
||||||
Usage: "Scrape state to find a miner based on peerid",
|
Usage: "Scrape state to find a miner based on peerid", Flags: []cli.Flag{
|
||||||
Flags: []cli.Flag{
|
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "repo",
|
Name: "repo",
|
||||||
Value: "~/.lotus",
|
Value: "~/.lotus",
|
||||||
EnvVars: []string{"LOTUS_PATH"},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(cctx *cli.Context) error {
|
Action: func(cctx *cli.Context) error {
|
||||||
|
@ -28,12 +28,10 @@ import (
|
|||||||
|
|
||||||
var minerTypesCmd = &cli.Command{
|
var minerTypesCmd = &cli.Command{
|
||||||
Name: "miner-types",
|
Name: "miner-types",
|
||||||
Usage: "Scrape state to report on how many miners of each WindowPoStProofType exist",
|
Usage: "Scrape state to report on how many miners of each WindowPoStProofType exist", Flags: []cli.Flag{
|
||||||
Flags: []cli.Flag{
|
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "repo",
|
Name: "repo",
|
||||||
Value: "~/.lotus",
|
Value: "~/.lotus",
|
||||||
EnvVars: []string{"LOTUS_PATH"},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(cctx *cli.Context) error {
|
Action: func(cctx *cli.Context) error {
|
||||||
|
@ -45,7 +45,6 @@ var multisigGetAllCmd = &cli.Command{
|
|||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "repo",
|
Name: "repo",
|
||||||
Value: "~/.lotus",
|
Value: "~/.lotus",
|
||||||
EnvVars: []string{"LOTUS_PATH"},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(cctx *cli.Context) error {
|
Action: func(cctx *cli.Context) error {
|
||||||
|
@ -17,6 +17,12 @@ import (
|
|||||||
var noncefix = &cli.Command{
|
var noncefix = &cli.Command{
|
||||||
Name: "noncefix",
|
Name: "noncefix",
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
|
&cli.StringFlag{
|
||||||
|
Name: "repo",
|
||||||
|
EnvVars: []string{"LOTUS_PATH"},
|
||||||
|
Hidden: true,
|
||||||
|
Value: "~/.lotus", // TODO: Consider XDG_DATA_HOME
|
||||||
|
},
|
||||||
&cli.Uint64Flag{
|
&cli.Uint64Flag{
|
||||||
Name: "start",
|
Name: "start",
|
||||||
},
|
},
|
||||||
|
@ -88,7 +88,6 @@ var stateTreePruneCmd = &cli.Command{
|
|||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "repo",
|
Name: "repo",
|
||||||
Value: "~/.lotus",
|
Value: "~/.lotus",
|
||||||
EnvVars: []string{"LOTUS_PATH"},
|
|
||||||
},
|
},
|
||||||
&cli.Int64Flag{
|
&cli.Int64Flag{
|
||||||
Name: "keep-from-lookback",
|
Name: "keep-from-lookback",
|
||||||
|
@ -41,7 +41,6 @@ var splitstoreRollbackCmd = &cli.Command{
|
|||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "repo",
|
Name: "repo",
|
||||||
Value: "~/.lotus",
|
Value: "~/.lotus",
|
||||||
EnvVars: []string{"LOTUS_PATH"},
|
|
||||||
},
|
},
|
||||||
&cli.BoolFlag{
|
&cli.BoolFlag{
|
||||||
Name: "gc-coldstore",
|
Name: "gc-coldstore",
|
||||||
@ -132,7 +131,6 @@ var splitstoreClearCmd = &cli.Command{
|
|||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "repo",
|
Name: "repo",
|
||||||
Value: "~/.lotus",
|
Value: "~/.lotus",
|
||||||
EnvVars: []string{"LOTUS_PATH"},
|
|
||||||
},
|
},
|
||||||
&cli.BoolFlag{
|
&cli.BoolFlag{
|
||||||
Name: "keys-only",
|
Name: "keys-only",
|
||||||
|
@ -35,7 +35,6 @@ var terminationsCmd = &cli.Command{
|
|||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "repo",
|
Name: "repo",
|
||||||
Value: "~/.lotus",
|
Value: "~/.lotus",
|
||||||
EnvVars: []string{"LOTUS_PATH"},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(cctx *cli.Context) error {
|
Action: func(cctx *cli.Context) error {
|
||||||
|
Loading…
Reference in New Issue
Block a user