From 84f1037b8f6057405fdd6535bd88b994a29af221 Mon Sep 17 00:00:00 2001 From: Marcio Castilho Date: Wed, 17 May 2017 11:07:33 -0400 Subject: [PATCH] Update global_debug.go The variable was wrong and the CPU profile was never being created. --- src/cmds/restic/global_debug.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cmds/restic/global_debug.go b/src/cmds/restic/global_debug.go index 998f349b2..5c0ec75a6 100644 --- a/src/cmds/restic/global_debug.go +++ b/src/cmds/restic/global_debug.go @@ -55,8 +55,8 @@ func runDebug() error { if memProfilePath != "" { prof = profile.Start(profile.Quiet, profile.MemProfile, profile.ProfilePath(memProfilePath)) - } else if memProfilePath != "" { - prof = profile.Start(profile.Quiet, profile.CPUProfile, profile.ProfilePath(memProfilePath)) + } else if cpuProfilePath != "" { + prof = profile.Start(profile.Quiet, profile.CPUProfile, profile.ProfilePath(cpuProfilePath)) } if insecure {