MCPcopy Create free account
hub / github.com/devspace-sh/devspace / Run

Method Run

helper/cmd/sync/upstream.go:49–69  ·  view source on GitHub ↗

Run runs the command logic

(cobraCmd *cobra.Command, args []string)

Source from the content-addressed store, hash-verified

47
48// Run runs the command logic
49func (cmd *UpstreamCmd) Run(cobraCmd *cobra.Command, args []string) error {
50 absolutePath, err := ensurePath(args)
51 if err != nil {
52 return err
53 }
54
55 return server.StartUpstreamServer(os.Stdin, os.Stdout, &server.UpstreamOptions{
56 UploadPath: absolutePath,
57 ExludePaths: cmd.Exclude,
58
59 FileChangeCmd: cmd.FileChangeCmd,
60 FileChangeArgs: cmd.FileChangeArgs,
61
62 DirCreateCmd: cmd.DirCreateCmd,
63 DirCreateArgs: cmd.DirCreateArgs,
64
65 OverridePermission: cmd.OverridePermissions,
66 ExitOnClose: true,
67 Ping: true,
68 })
69}
70
71func ensurePath(args []string) (string, error) {
72 // Create the directory if it does not exist

Callers

nothing calls this directly

Calls 2

StartUpstreamServerFunction · 0.92
ensurePathFunction · 0.85

Tested by

no test coverage detected