Skip to content

Commit

Permalink
fix import/export cli
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Winther <[email protected]>
  • Loading branch information
jippi committed Sep 19, 2018
1 parent 9eb3b20 commit 45b5aba
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package main

import (
"fmt"
"os"
"sort"
"time"
Expand Down Expand Up @@ -227,10 +226,14 @@ func main() {
Action: func(c *cli.Context) error {
configFile := c.Args().Get(0)
if configFile == "" {
return fmt.Errorf("Missing file name")
log.Fatal("Missing file name")
}

return scale.ExportCommand(configFile)
if err := scale.ExportCommand(configFile); err != nil {
log.Fatal(err)
}

return nil
},
},
{
Expand All @@ -239,10 +242,14 @@ func main() {
Action: func(c *cli.Context) error {
configFile := c.Args().Get(0)
if configFile == "" {
return fmt.Errorf("Missing file name")
log.Fatal("Missing file name")
}

return scale.ImportCommand(configFile)
if err := scale.ImportCommand(configFile); err != nil {
log.Fatal(err)
}

return nil
},
},
},
Expand Down

0 comments on commit 45b5aba

Please sign in to comment.