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

Function checkRillRepo

cli/cmd/devtool/start.go:175–192  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

173}
174
175func checkRillRepo() error {
176 _, err := os.Stat(".git")
177 if err != nil {
178 return fmt.Errorf("you must run `rill devtool` from the root of the rill repository")
179 }
180
181 remote, err := gitutil.ExtractGitRemote("", "", false)
182 if err != nil {
183 return fmt.Errorf("error extracting git remote: %w", err)
184 }
185 githubRemote, _ := remote.Github()
186
187 if githubRemote != rillGitRemote {
188 return fmt.Errorf("you must run `rill devtool` from the rill repository (expected remote %q, got %q)", rillGitRemote, githubRemote)
189 }
190
191 return nil
192}
193
194type servicesCfg struct {
195 admin bool

Callers 3

startFunction · 0.85
DotenvRefreshCmdFunction · 0.85
DotenvUploadCmdFunction · 0.85

Calls 4

ExtractGitRemoteFunction · 0.92
GithubMethod · 0.80
StatMethod · 0.65
ErrorfMethod · 0.65

Tested by

no test coverage detected