cmd: write config json file into the backtest report dir

This commit is contained in:
c9s 2022-09-06 13:20:37 +08:00
parent 8ed39f7565
commit ed975de2cd
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -563,7 +563,12 @@ var BacktestCmd = &cobra.Command{
fmt.Println(summaryReportFile)
if err := util.WriteJsonFile(summaryReportFile, summaryReport); err != nil {
return err
return errors.Wrapf(err, "can not write summary report json file: %s", summaryReportFile)
}
configJsonFile := filepath.Join(reportDir, "config.json")
if err := util.WriteJsonFile(configJsonFile, userConfig); err != nil {
return errors.Wrapf(err, "can not write config json file: %s", configJsonFile)
}
// append report index