(app *App)
| 13 | ) |
| 14 | |
| 15 | func 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 | |
| 32 | func (a *App) Jupyter(ctx context.Context, selector *CodespaceSelector) (err error) { |
| 33 | // Ensure all child tasks (e.g. port forwarding) terminate before return. |
no test coverage detected