mirror of
https://github.com/dolthub/dolt.git
synced 2026-03-13 19:29:58 -05:00
Changed batch mode to update the repo state before exiting in the case of an error
This commit is contained in:
@@ -394,6 +394,10 @@ func execBatch(sqlCtx *sql.Context, readOnly bool, mrEnv env.MultiRepoEnv, roots
|
||||
|
||||
err = runBatchMode(sqlCtx, se, batchInput)
|
||||
if err != nil {
|
||||
// If we encounter an error, flush what we have so far to disk before exiting
|
||||
_ = flushBatchedEdits(sqlCtx, se)
|
||||
_ = writeRoots(sqlCtx, se, mrEnv, roots)
|
||||
|
||||
return errhand.BuildDError("Error processing batch").Build()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user