(ctx context.Context)
| 25 | } |
| 26 | |
| 27 | func (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 | |
| 48 | func (p *pullbox) isLocalConfig() bool { |
| 49 | _, err := os.Stat(p.URL) |
no test coverage detected