Skip to content

Commit

Permalink
fix(run): Do not run lightweight check for project validty
Browse files Browse the repository at this point in the history
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 <alex@unikraft.io>
  • Loading branch information
nderjung committed Nov 23, 2024
1 parent a3a4be7 commit 152b4f0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
4 changes: 0 additions & 4 deletions internal/cli/kraft/run/runner_kraftfile_runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
}
Expand Down
4 changes: 0 additions & 4 deletions internal/cli/kraft/run/runner_kraftfile_unikraft.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
}
Expand Down

0 comments on commit 152b4f0

Please sign in to comment.