mirror of https://github.com/perkeep/perkeep.git
Merge "Clarified use of camtool googinit"
This commit is contained in:
commit
4ac89ec630
|
@ -36,7 +36,7 @@ type googinitCmd struct {
|
||||||
func init() {
|
func init() {
|
||||||
cmdmain.RegisterCommand("googinit", func(flags *flag.FlagSet) cmdmain.CommandRunner {
|
cmdmain.RegisterCommand("googinit", func(flags *flag.FlagSet) cmdmain.CommandRunner {
|
||||||
cmd := new(googinitCmd)
|
cmd := new(googinitCmd)
|
||||||
flags.StringVar(&cmd.storageType, "type", "drive", "Storage type: drive or cloud")
|
flags.StringVar(&cmd.storageType, "type", "", "Storage type: drive or cloud")
|
||||||
return cmd
|
return cmd
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ func (c *googinitCmd) RunCommand(args []string) error {
|
||||||
)
|
)
|
||||||
|
|
||||||
if c.storageType != "drive" && c.storageType != "cloud" {
|
if c.storageType != "drive" && c.storageType != "cloud" {
|
||||||
return cmdmain.UsageError("Invalid storage type.")
|
return cmdmain.UsageError("Invalid storage type: must be drive for Google Drive or cloud for Google Cloud Storage.")
|
||||||
}
|
}
|
||||||
|
|
||||||
if clientId, clientSecret, err = getClientInfo(); err != nil {
|
if clientId, clientSecret, err = getClientInfo(); err != nil {
|
||||||
|
|
Loading…
Reference in New Issue