Skip to content

Commit

Permalink
Merge pull request #75 from tkuchiki/fix-dump-and-load-not-working
Browse files Browse the repository at this point in the history
Fix `--dump` and `--load` option not working
  • Loading branch information
tkuchiki authored Jul 24, 2023
2 parents 9cef20e + 743baa3 commit 2ba80ec
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions cmd/alp/cmd/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,16 @@ func createOptions(cmd *cobra.Command, sortOptions *stats.SortOptions) (*options
return nil, err
}

dump, err := cmd.PersistentFlags().GetString("dump")
if err != nil {
return nil, err
}

load, err := cmd.PersistentFlags().GetString("load")
if err != nil {
return nil, err
}

format, err := cmd.PersistentFlags().GetString("format")
if err != nil {
return nil, err
Expand Down Expand Up @@ -172,6 +182,8 @@ func createOptions(cmd *cobra.Command, sortOptions *stats.SortOptions) (*options

return options.SetOptions(opts,
options.File(file),
options.Dump(dump),
options.Load(load),
options.Sort(sortOptions.SortType()),
options.Reverse(reverse),
options.Format(format),
Expand Down

0 comments on commit 2ba80ec

Please sign in to comment.