MCPcopy Index your code
hub / github.com/jetify-com/devbox / pullTextDevboxConfig

Method pullTextDevboxConfig

internal/pullbox/config.go:27–46  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

25}
26
27func (p *pullbox) pullTextDevboxConfig(ctx context.Context) error {
28 if p.isLocalConfig() {
29 return p.copyToProfile(p.URL)
30 }
31
32 cfg, err := devconfig.LoadConfigFromURL(ctx, p.URL)
33 if err != nil {
34 return err
35 }
36
37 tmpDir, err := fileutil.CreateDevboxTempDir()
38 if err != nil {
39 return err
40 }
41 if err = cfg.Root.SaveTo(tmpDir); err != nil {
42 return err
43 }
44
45 return p.copyToProfile(tmpDir)
46}
47
48func (p *pullbox) isLocalConfig() bool {
49 _, err := os.Stat(p.URL)

Callers 1

PullMethod · 0.95

Calls 5

isLocalConfigMethod · 0.95
copyToProfileMethod · 0.95
LoadConfigFromURLFunction · 0.92
CreateDevboxTempDirFunction · 0.92
SaveToMethod · 0.80

Tested by

no test coverage detected