Skip to content

Commit

Permalink
close #17 #27: improve error message when --msi flag is not provided …
Browse files Browse the repository at this point in the history
…in the command line
  • Loading branch information
mh-cbon committed Aug 23, 2017
1 parent 583cd1b commit 549a52a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,10 @@ func generateWixCommands(c *cli.Context) error {
msi := c.String("msi")
arch := c.String("arch")

if msi == "" {
return cli.NewExitError("--msi parameter must be set", 1)
}

templates, err := tpls.Find(src, "*.wxs")
if err != nil {
return cli.NewExitError(err.Error(), 1)
Expand Down Expand Up @@ -595,6 +599,10 @@ func quickMake(c *cli.Context) error {
arch := c.String("arch")
keep := c.Bool("keep")

if msi == "" {
return cli.NewExitError("--msi parameter must be set", 1)
}

wixFile := manifest.WixManifest{}
if err := wixFile.Load(path); err != nil {
return cli.NewExitError(err.Error(), 1)
Expand Down

0 comments on commit 549a52a

Please sign in to comment.