(deps commandDeps)
| 378 | } |
| 379 | |
| 380 | func newConfigListCommand(deps commandDeps) *cobra.Command { |
| 381 | var workspaceRoot string |
| 382 | cmd := &cobra.Command{ |
| 383 | Use: configListKey, |
| 384 | Short: "List redacted effective config values", |
| 385 | Args: cobra.NoArgs, |
| 386 | RunE: func(cmd *cobra.Command, _ []string) error { |
| 387 | cfg, resolvedWorkspace, err := loadConfigForDisplay(deps, workspaceRoot) |
| 388 | if err != nil { |
| 389 | return err |
| 390 | } |
| 391 | record := configListRecord{ |
| 392 | Scope: scopeForWorkspace(resolvedWorkspace), |
| 393 | WorkspaceRoot: resolvedWorkspace, |
| 394 | Redacted: true, |
| 395 | Entries: flattenConfigEntries(redactedConfigMap(&cfg)), |
| 396 | } |
| 397 | return writeCommandOutput(cmd, configListBundle(record)) |
| 398 | }, |
| 399 | } |
| 400 | cmd.Flags().StringVar(&workspaceRoot, "workspace", "", "Workspace root whose overlay should be included") |
| 401 | return cmd |
| 402 | } |
| 403 | |
| 404 | func newConfigGetCommand(deps commandDeps) *cobra.Command { |
| 405 | var workspaceRoot string |
no test coverage detected