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

Function RepoForProjectPath

cli/pkg/cmdutil/project.go:17–25  ·  view source on GitHub ↗

RepoForProjectPath creates an ad-hoc drivers.RepoStore for a local project file path

(path string)

Source from the content-addressed store, hash-verified

15
16// RepoForProjectPath creates an ad-hoc drivers.RepoStore for a local project file path
17func RepoForProjectPath(path string) (drivers.RepoStore, string, error) {
18 instanceID := "default"
19 repoHandle, err := drivers.Open("file", "", instanceID, map[string]any{"dsn": path}, storage.MustNew(os.TempDir(), nil), activity.NewNoopClient(), zap.NewNop())
20 if err != nil {
21 return nil, "", err
22 }
23 repo, _ := repoHandle.AsRepoStore(instanceID)
24 return repo, instanceID, nil
25}
26
27func HasRillProject(dir string) bool {
28 repo, _, err := RepoForProjectPath(dir)

Callers 9

ParseDotenvFunction · 0.92
NewAppFunction · 0.92
emitStartEventMethod · 0.92
DeployWithUploadFlowFunction · 0.92
redeployProjectFunction · 0.92
InitCmdFunction · 0.92
PushCmdFunction · 0.92
PullVarsFunction · 0.92
HasRillProjectFunction · 0.85

Calls 5

OpenFunction · 0.92
MustNewFunction · 0.92
NewNoopClientFunction · 0.92
TempDirMethod · 0.65
AsRepoStoreMethod · 0.65

Tested by

no test coverage detected