Skip to content

Commit

Permalink
Deprecated --resilient, resilient is a default now, use --stop-on-error
Browse files Browse the repository at this point in the history
if you want to abort scan on any error
  • Loading branch information
tigrawap committed Sep 10, 2020
1 parent d3d7478 commit 44a4000
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,8 @@ func (e *Explorer) readdir(dir string) {
}

type Options struct {
Resilient bool `long:"resilient" description:"Do not stop on errors, instead print to stderr"`
Resilient bool `long:"resilient" description:"DEPRECATED and ignored, resilient is a default, use --stop-on-error if it is undesired behaviour"`
StopOnError bool `long:"stop-on-error" description:"Aborts scan on any error"`
Inodes bool `long:"inodes" description:"Output inodes along with filenames"`
Threads int `short:"j" long:"jobs" description:"Number of jobs(threads)" default:"128"`
WithSizes bool `long:"with-size" description:"Output file sizes along with filenames"`
Expand Down Expand Up @@ -492,7 +493,7 @@ func main() {

//TODO: Refactor Explorer to Lib with proper public API and sane defaults, so none of this calls will be necessary
explorer := NewExplorer(ctx)
explorer.resilient = opts.Resilient
explorer.resilient = !opts.StopOnError
explorer.SetIncludedTypes(opts.Type)
explorer.SetThreads(opts.Threads)
explorer.inodes = opts.Inodes
Expand Down

0 comments on commit 44a4000

Please sign in to comment.