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

Function downloadDotenv

cli/cmd/devtool/dotenv.go:110–118  ·  view source on GitHub ↗
(ctx context.Context, preset string)

Source from the content-addressed store, hash-verified

108}
109
110func downloadDotenv(ctx context.Context, preset string) error {
111 logInfo.Printf("Downloading .env file from %s\n", dotenvURLs[preset])
112
113 err := exec.CommandContext(ctx, "gcloud", "storage", "cp", dotenvURLs[preset], ".env").Run()
114 if err != nil {
115 return fmt.Errorf("error syncing '.env' file from GCS (you must be a Rill team member and have authenticated `gcloud`): %w", err)
116 }
117 return nil
118}
119
120func uploadDotenv(ctx context.Context, preset string) error {
121 return exec.CommandContext(ctx, "gcloud", "storage", "cp", ".env", dotenvURLs[preset]).Run()

Callers 2

startMethod · 0.85
DotenvRefreshCmdFunction · 0.85

Calls 3

PrintfMethod · 0.80
ErrorfMethod · 0.65
RunMethod · 0.45

Tested by

no test coverage detected