From cd95232ac74e187b6cc9afeb3b46a8414474378b Mon Sep 17 00:00:00 2001 From: KOBAYASHI Shinji Date: Thu, 30 Jun 2016 06:46:14 +0000 Subject: [PATCH] Remove "open : no such file or directory" message during crash report Add an empty string check to the path argument of addFile(). Send() method of BugsnagCrashReporter calls addFile() passing err.LogFilePath as the path argument, which is an empty string if the driver is not virtualbox. Fixes #3559 Signed-off-by: KOBAYASHI Shinji --- libmachine/crashreport/crash_report.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libmachine/crashreport/crash_report.go b/libmachine/crashreport/crash_report.go index 1d1ddd2414..b59d63f514 100644 --- a/libmachine/crashreport/crash_report.go +++ b/libmachine/crashreport/crash_report.go @@ -112,6 +112,9 @@ func (r *BugsnagCrashReporter) noReportFileExist() bool { } func addFile(path string, metaData *bugsnag.MetaData) { + if path == "" { + return + } file, err := os.Open(path) if err != nil { log.Debug(err)