MCPcopy Index your code
hub / github.com/rilldata/rill / ValidateLocalProject

Function ValidateLocalProject

cli/cmd/project/deploy.go:312–329  ·  view source on GitHub ↗
(ch *cmdutil.Helper, localGitPath, subPath string)

Source from the content-addressed store, hash-verified

310}
311
312func ValidateLocalProject(ch *cmdutil.Helper, localGitPath, subPath string) (string, string, error) {
313 var localProjectPath string
314 if subPath == "" {
315 localProjectPath = localGitPath
316 } else {
317 localProjectPath = filepath.Join(localGitPath, subPath)
318 }
319
320 // Verify that localProjectPath contains a Rill project.
321 if cmdutil.HasRillProject(localProjectPath) {
322 return localGitPath, localProjectPath, nil
323 }
324
325 ch.PrintfWarn("Directory %q doesn't contain a valid Rill project.\n", localProjectPath)
326 ch.PrintfWarn("Run `rill project deploy` from a Rill project directory or use `--path` to pass a project path.\n")
327 ch.PrintfWarn("Run `rill start` to initialize a new Rill project.\n")
328 return "", "", ErrInvalidProject
329}
330
331func DeployWithUploadFlow(ctx context.Context, ch *cmdutil.Helper, opts *DeployOpts) error {
332 localProjectPath := opts.LocalProjectPath()

Callers 1

Calls 2

HasRillProjectFunction · 0.92
PrintfWarnMethod · 0.80

Tested by

no test coverage detected