File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 4
4
"fmt"
5
5
"io"
6
6
"os"
7
+ "path/filepath"
7
8
"srcfingerprint"
8
9
"srcfingerprint/cloner"
9
10
"srcfingerprint/exporter"
@@ -167,6 +168,7 @@ func mainAction(c *cli.Context) error {
167
168
}
168
169
169
170
output := os .Stdout
171
+ fsOutput := false
170
172
171
173
if c .String ("output" ) != "-" {
172
174
changedOutput , err := os .OpenFile (c .String ("output" ), os .O_RDWR | os .O_CREATE , os .ModePerm )
@@ -175,6 +177,7 @@ func mainAction(c *cli.Context) error {
175
177
}
176
178
177
179
output = changedOutput
180
+ fsOutput = true
178
181
179
182
defer output .Close ()
180
183
}
@@ -283,5 +286,11 @@ loop:
283
286
}
284
287
285
288
log .Infoln ("Done" )
289
+
290
+ if fsOutput {
291
+ path , _ := filepath .Abs (c .String ("output" ))
292
+ fmt .Printf ("Collected file hashes saved in file %s\n " , path ) // nolint
293
+ }
294
+
286
295
return nil
287
296
}
You can’t perform that action at this time.
0 commit comments