Skip to content

Commit a51de0c

Browse files
committed
fix: skip ensure docker for L1 deploy outside of devnet
1 parent 694b4ee commit a51de0c

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

pkg/commands/deploy_actions.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -235,12 +235,6 @@ func DeployL1ContractsAction(cCtx *cli.Context) error {
235235
logger := common.LoggerFromContext(cCtx)
236236
caser := cases.Title(language.English)
237237

238-
// Check if docker is running, else try to start it
239-
err := common.EnsureDockerIsRunning(cCtx)
240-
if err != nil {
241-
return cli.Exit(err.Error(), 1)
242-
}
243-
244238
// Start timing execution runtime
245239
startTime := time.Now()
246240

@@ -261,6 +255,7 @@ func DeployL1ContractsAction(cCtx *cli.Context) error {
261255
contextName := cCtx.String("context")
262256

263257
// Check for context
258+
var err error
264259
var yamlPath string
265260
var rootNode, contextNode *yaml.Node
266261
if contextName == "" {

pkg/commands/devnet_actions.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,13 @@ func StartDevnetAction(cCtx *cli.Context) error {
330330

331331
// Deploy the contracts after starting devnet unless skipped
332332
if !skipDeployContracts {
333+
// Check if docker is running, else try to start it
334+
err := common.EnsureDockerIsRunning(cCtx)
335+
if err != nil {
336+
return cli.Exit(err.Error(), 1)
337+
}
338+
339+
// Call deploy L1 action within devnet context
333340
if err := DeployL1ContractsAction(cCtx); err != nil {
334341
return fmt.Errorf("deploy-contracts failed - please restart devnet and try again: %w", err)
335342
}

0 commit comments

Comments
 (0)