diff options
Diffstat (limited to 'cmd/root.go')
-rw-r--r-- | cmd/root.go | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/cmd/root.go b/cmd/root.go index 12f3e19..a66fa62 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -60,9 +60,9 @@ var ( toClose []io.Closer // === IO === - stageFilePath string - outputMethod string - outputPath string + //stageFilePath string // FUTURE + outputMethod string + outputPath string // ========== // === Logging === @@ -196,6 +196,12 @@ Authors: FalconOps LLC (@FalconOpsLLC), pprof.StopCPUProfile() } + if exec.Input != nil && exec.Input.StageFile != nil { + if err := exec.Input.StageFile.Close(); err != nil { + log.Warn().Err(err).Msg("Failed to close stage file") + } + } + for _, c := range toClose { if c != nil { if err := c.Close(); err != nil { @@ -203,12 +209,6 @@ Authors: FalconOps LLC (@FalconOpsLLC), } } } - - if exec.Input != nil && exec.Input.StageFile != nil { - if err := exec.Input.StageFile.Close(); err != nil { - // ... - } - } }, } ) |