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

Function DotenvRefreshCmd

cli/cmd/devtool/dotenv.go:25–51  ·  view source on GitHub ↗
(ch *cmdutil.Helper)

Source from the content-addressed store, hash-verified

23}
24
25func DotenvRefreshCmd(ch *cmdutil.Helper) *cobra.Command {
26 cmd := &cobra.Command{
27 Use: "refresh {cloud|e2e|other}",
28 Short: "Refresh .env file from shared storage",
29 Args: cobra.ExactArgs(1),
30 RunE: func(cmd *cobra.Command, args []string) error {
31 preset := args[0]
32 if preset != "cloud" && preset != "e2e" && preset != "other" {
33 return fmt.Errorf(".env not used for preset %q", preset)
34 }
35
36 err := checkRillRepo()
37 if err != nil {
38 return err
39 }
40
41 err = downloadDotenv(cmd.Context(), preset)
42 if err != nil {
43 return err
44 }
45
46 return nil
47 },
48 }
49
50 return cmd
51}
52
53func DotenvUploadCmd(ch *cmdutil.Helper) *cobra.Command {
54 cmd := &cobra.Command{

Callers 1

DotenvCmdFunction · 0.85

Calls 4

checkRillRepoFunction · 0.85
downloadDotenvFunction · 0.85
ErrorfMethod · 0.65
ContextMethod · 0.65

Tested by

no test coverage detected