MCPcopy
hub / github.com/cli/cli / newJupyterCmd

Function newJupyterCmd

pkg/cmd/codespace/jupyter.go:15–30  ·  view source on GitHub ↗
(app *App)

Source from the content-addressed store, hash-verified

13)
14
15func newJupyterCmd(app *App) *cobra.Command {
16 var selector *CodespaceSelector
17
18 jupyterCmd := &cobra.Command{
19 Use: "jupyter",
20 Short: "Open a codespace in JupyterLab",
21 Args: noArgsConstraint,
22 RunE: func(cmd *cobra.Command, args []string) error {
23 return app.Jupyter(cmd.Context(), selector)
24 },
25 }
26
27 selector = AddCodespaceSelector(jupyterCmd, app.apiClient)
28
29 return jupyterCmd
30}
31
32func (a *App) Jupyter(ctx context.Context, selector *CodespaceSelector) (err error) {
33 // Ensure all child tasks (e.g. port forwarding) terminate before return.

Callers 1

NewCmdCodespaceFunction · 0.85

Calls 2

AddCodespaceSelectorFunction · 0.85
JupyterMethod · 0.80

Tested by

no test coverage detected