Skip to content

Commit

Permalink
Preventing a potential issue of Regolith getting stuck in watch mode …
Browse files Browse the repository at this point in the history
…in case of failing to run the 'ExportProject' function.
  • Loading branch information
Nusiq committed Oct 14, 2024
1 parent 0646a67 commit e66dcdb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions regolith/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,14 @@ start:
context.fileWatchingStage <- "pause"
}
err = ExportProject(context)
if err != nil {
return burrito.WrapError(err, exportProjectError)
}
if context.IsInWatchMode() {
// We need to restart the watcher before error handling. See:
// https://github.com/Bedrock-OSS/regolith/pull/297#issuecomment-2411981894
context.fileWatchingStage <- "restart"
}
if err != nil {
return burrito.WrapError(err, exportProjectError)
}
if context.IsInterrupted("data") {
goto start
}
Expand Down

0 comments on commit e66dcdb

Please sign in to comment.