Fix releaser (#988)

* fix releaser

* fix releaser

* fix releaser

* fix releaser

* add 32 bit releaser and add exit code  in cmd

* delete 32 bit releaser

* fix
This commit is contained in:
sadayuki-matsuno
2020-06-05 15:04:06 +09:00
committed by GitHub
parent b37df89fb1
commit 4ae87cc36c
3 changed files with 54 additions and 3 deletions

View File

@@ -58,12 +58,14 @@ func main() {
scanResultJSON = buf.Bytes()
} else {
fmt.Println("use --stdin option")
os.Exit(1)
return
}
var scanResult models.ScanResult
if err = json.Unmarshal(scanResultJSON, &scanResult); err != nil {
fmt.Println("Failed to parse json", err)
os.Exit(1)
return
}
scanResult.ServerUUID = serverUUID
@@ -72,7 +74,8 @@ func main() {
config.Conf.Saas.Token = token
config.Conf.Saas.URL = url
if err = (report.SaasWriter{}).Write(scanResult); err != nil {
fmt.Println("Failed to create json", err)
fmt.Println(err)
os.Exit(1)
return
}
return