From 358c54c21fcc0a688c40067623f1fd848fac4ce6 Mon Sep 17 00:00:00 2001 From: Paris Zoumpouloglou Date: Wed, 21 Sep 2016 17:10:20 -0700 Subject: [PATCH] Added flag to specify temporary folder --- contrib/analyze-local-images/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/analyze-local-images/main.go b/contrib/analyze-local-images/main.go index f36526e2..bcd8a536 100644 --- a/contrib/analyze-local-images/main.go +++ b/contrib/analyze-local-images/main.go @@ -50,6 +50,7 @@ var ( flagMyAddress = flag.String("my-address", "127.0.0.1", "Address from the point of view of Clair") flagMinimumSeverity = flag.String("minimum-severity", "Negligible", "Minimum severity of vulnerabilities to show (Unknown, Negligible, Low, Medium, High, Critical, Defcon1)") flagColorMode = flag.String("color", "auto", "Colorize the output (always, auto, never)") + flagTempDir = flag.String("tempdir", "/tmp", "Temporary folder") ) type vulnerabilityInfo struct { @@ -116,7 +117,7 @@ func intMain() int { } // Create a temporary folder. - tmpPath, err := ioutil.TempDir("", "analyze-local-image-") + tmpPath, err := ioutil.TempDir(*flagTempDir, "analyze-local-image-") if err != nil { log.Fatalf("Could not create temporary folder: %s", err) }