From 1626b952e74302e9629318c02828f54f87cd5ab2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mi=C5=82osz=20Sm=C3=B3=C5=82ka?= Date: Thu, 29 Feb 2024 10:13:06 +0100 Subject: [PATCH] Fix clone and workspaces --- trainings/clone.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/trainings/clone.go b/trainings/clone.go index a37636e..213debd 100644 --- a/trainings/clone.go +++ b/trainings/clone.go @@ -40,11 +40,6 @@ func (h *Handlers) Clone(ctx context.Context, executionID string) error { return errors.Wrap(err, "can't write training config") } - err = addModuleToWorkspace(pwd, resp.Dir) - if err != nil { - logrus.WithError(err).Warn("Failed to add module to workspace") - } - files := &genproto.NextExerciseResponse{ TrainingStatus: genproto.NextExerciseResponse_IN_PROGRESS, Dir: resp.Dir, @@ -57,5 +52,10 @@ func (h *Handlers) Clone(ctx context.Context, executionID string) error { return err } + err = addModuleToWorkspace(pwd, resp.Dir) + if err != nil { + logrus.WithError(err).Warn("Failed to add module to workspace") + } + return nil }