Skip to content

Commit

Permalink
fix(devnet): don't crash if container already started
Browse files Browse the repository at this point in the history
  • Loading branch information
egasimus committed Aug 20, 2023
1 parent e4adb2a commit 9234d64
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion fadroma-devnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,13 @@ export class Devnet implements DevnetHandle {
if (!this.running) {
const container = await this.container ?? await (await this.create()).container!
this.log.startingContainer(container.id)
await container.start()
try {
await container.start()
} catch (e) {
// Don't throw if container already started.
// TODO: This must be handled in @hackbg/dock
if (e.code !== 304) throw e
}
this.running = true
await this.save()
await container.waitLog(this.readyPhrase, Devnet.logFilter, true)
Expand Down

0 comments on commit 9234d64

Please sign in to comment.