2019-01-24 20:15:10 +00:00
|
|
|
// Copyright (C) 2019 Storj Labs, Inc.
|
2018-07-26 15:21:35 +01:00
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2020-01-09 13:38:19 +00:00
|
|
|
"github.com/spf13/cobra"
|
|
|
|
"github.com/spf13/viper"
|
|
|
|
|
2018-09-07 16:01:04 +01:00
|
|
|
"storj.io/storj/cmd/uplink/cmd"
|
2018-07-26 15:21:35 +01:00
|
|
|
"storj.io/storj/pkg/process"
|
2018-07-30 08:38:31 +01:00
|
|
|
)
|
|
|
|
|
2018-07-26 15:21:35 +01:00
|
|
|
func main() {
|
2020-01-09 13:38:19 +00:00
|
|
|
process.ExecWithCustomConfig(cmd.RootCmd, func(cmd *cobra.Command, vip *viper.Viper) error {
|
|
|
|
accessFlag := cmd.Flags().Lookup("access")
|
|
|
|
if accessFlag == nil || accessFlag.Value.String() == "" {
|
|
|
|
return process.LoadConfig(cmd, vip)
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
})
|
2018-07-26 15:21:35 +01:00
|
|
|
}
|