1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-08-08 06:55:28 +02:00

catch error in SDK documize command

This commit is contained in:
Elliott Stoneham 2016-06-17 17:30:51 +01:00
parent 936b68850e
commit f462631f83

View file

@ -1,11 +1,11 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
// by contacting <sales@documize.com>.
//
// https://documize.com
@ -30,7 +30,10 @@ func main() {
flagSet.String("folder", "", "the Documize folder to use"),
flagSet.String("action", "load", "the Documize action to take")
flagSet.Parse(os.Args[1:])
if err := flagSet.Parse(os.Args[1:]); err != nil {
fmt.Println("unable to parse Documize arguments:", err)
os.Exit(1)
}
if *url == "" {
fmt.Println("Please set the environment variable DOCUMIZEAPI or use the -api flag")