From 152b4f04b80c2b5ed21607a4031bf99defcac7d2 Mon Sep 17 00:00:00 2001 From: Alexander Jung Date: Sat, 23 Nov 2024 14:24:36 +0100 Subject: [PATCH] fix(run): Do not run lightweight check for project validty The full check occurs shortly after within `NewProjectFromOptions` and so this check is redundant. Further still, since the check looks for default `Kraftfile` names, specifying an alternative name would result in this check to fail. The alternative name, is however, handled correctly subsequently and passed into `NewProjectFromOptions`. GitHub-Fixes: #1969 Signed-off-by: Alexander Jung --- internal/cli/kraft/run/runner_kraftfile_runtime.go | 4 ---- internal/cli/kraft/run/runner_kraftfile_unikraft.go | 4 ---- 2 files changed, 8 deletions(-) diff --git a/internal/cli/kraft/run/runner_kraftfile_runtime.go b/internal/cli/kraft/run/runner_kraftfile_runtime.go index 598860012..30154df0c 100644 --- a/internal/cli/kraft/run/runner_kraftfile_runtime.go +++ b/internal/cli/kraft/run/runner_kraftfile_runtime.go @@ -62,10 +62,6 @@ func (runner *runnerKraftfileRuntime) Runnable(ctx context.Context, opts *RunOpt } } - if !app.IsWorkdirInitialized(opts.workdir) { - return false, fmt.Errorf("path is not project: %s", opts.workdir) - } - popts := []app.ProjectOption{ app.WithProjectWorkdir(opts.workdir), } diff --git a/internal/cli/kraft/run/runner_kraftfile_unikraft.go b/internal/cli/kraft/run/runner_kraftfile_unikraft.go index ac39cc671..296167589 100644 --- a/internal/cli/kraft/run/runner_kraftfile_unikraft.go +++ b/internal/cli/kraft/run/runner_kraftfile_unikraft.go @@ -65,10 +65,6 @@ func (runner *runnerKraftfileUnikraft) Runnable(ctx context.Context, opts *RunOp } } - if !app.IsWorkdirInitialized(runner.workdir) { - return false, fmt.Errorf("path is not project: %s", runner.workdir) - } - popts := []app.ProjectOption{ app.WithProjectWorkdir(runner.workdir), }