get chris's nits.
This commit is contained in:
parent
3898556caa
commit
f534b85ee9
11
main.go
11
main.go
|
@ -75,10 +75,13 @@ func realMain() int {
|
||||||
|
|
||||||
// Enable checkpoint for panic reporting
|
// Enable checkpoint for panic reporting
|
||||||
config, err := loadConfig()
|
config, err := loadConfig()
|
||||||
if err == nil {
|
if err != nil {
|
||||||
if !config.DisableCheckpoint {
|
fmt.Fprintf(os.Stderr, "Couldn't load config: %s", err)
|
||||||
packer.CheckpointReporter.Enable(config.DisableCheckpointSignature)
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !config.DisableCheckpoint {
|
||||||
|
packer.CheckpointReporter.Enable(config.DisableCheckpointSignature)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the configuration for panicwrap and wrap our executable
|
// Create the configuration for panicwrap and wrap our executable
|
||||||
|
|
|
@ -2,7 +2,6 @@ package packer
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
@ -56,7 +55,7 @@ func (c *CheckpointTelemetry) Enable(disableSignature bool) {
|
||||||
func (c *CheckpointTelemetry) baseParams(prefix string) *checkpoint.ReportParams {
|
func (c *CheckpointTelemetry) baseParams(prefix string) *checkpoint.ReportParams {
|
||||||
version := packerVersion.Version
|
version := packerVersion.Version
|
||||||
if packerVersion.VersionPrerelease != "" {
|
if packerVersion.VersionPrerelease != "" {
|
||||||
version += fmt.Sprintf("-%s", packerVersion.VersionPrerelease)
|
version += "-" + packerVersion.VersionPrerelease
|
||||||
}
|
}
|
||||||
|
|
||||||
return &checkpoint.ReportParams{
|
return &checkpoint.ReportParams{
|
||||||
|
@ -69,9 +68,6 @@ func (c *CheckpointTelemetry) baseParams(prefix string) *checkpoint.ReportParams
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *CheckpointTelemetry) log(m string, args ...interface{}) {
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *CheckpointTelemetry) ReportPanic(m string) error {
|
func (c *CheckpointTelemetry) ReportPanic(m string) error {
|
||||||
if !c.enabled {
|
if !c.enabled {
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in New Issue