Skip to content

Commit

Permalink
fix the order of tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
himadrisingh committed Jan 2, 2025
1 parent 778d5c4 commit 7aaf44b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions cli/cmd/devtool/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,14 +224,6 @@ func (s *servicesCfg) parse() error {
type cloud struct{}

func (s cloud) start(ctx context.Context, ch *cmdutil.Helper, verbose, reset, refreshDotenv bool, preset string, services *servicesCfg) error {
if reset {
err := s.resetState(ctx)
if err != nil {
return fmt.Errorf("reset cloud deps: %w", err)
}
logInfo.Printf("Reset cloud dependencies\n")
}

if refreshDotenv {
err := downloadDotenv(ctx, preset)
if err != nil {
Expand All @@ -250,6 +242,14 @@ func (s cloud) start(ctx context.Context, ch *cmdutil.Helper, verbose, reset, re
return fmt.Errorf("error parsing .env: %w", err)
}

if reset {
err := s.resetState(ctx)
if err != nil {
return fmt.Errorf("reset cloud deps: %w", err)
}
logInfo.Printf("Reset cloud dependencies\n")
}

g, ctx := errgroup.WithContext(ctx)

stateDir := lookupDotenv("RILL_DEVTOOL_STATE_DIRECTORY")
Expand Down

0 comments on commit 7aaf44b

Please sign in to comment.