mirror of
https://github.com/turbot/steampipe.git
synced 2025-12-23 21:09:15 -05:00
Add deprecation warnings for Mod commands
* print errors and warnings to stderr * fix tests * Update description * update sample workspace profile content * Changelog for v0.22.0
This commit is contained in:
@@ -137,6 +137,11 @@ func runScheduledTasks(ctx context.Context, cmd *cobra.Command, args []string, e
|
||||
return nil
|
||||
}
|
||||
|
||||
// display deprecation warning for check, mod and dashboard commands
|
||||
if task.IsCheckCmd(cmd) || task.IsDashboardCmd(cmd) || task.IsModCmd(cmd) {
|
||||
displayPpDeprecationWarning()
|
||||
}
|
||||
|
||||
taskUpdateCtx, cancelFn := context.WithCancel(ctx)
|
||||
tasksCancelFn = cancelFn
|
||||
|
||||
@@ -464,3 +469,7 @@ func displayDeprecationWarnings(errorsAndWarnings *error_helpers.ErrorAndWarning
|
||||
fmt.Println()
|
||||
}
|
||||
}
|
||||
|
||||
func displayPpDeprecationWarning() {
|
||||
fmt.Fprintf(color.Error, "\n%s Steampipe mods and dashboards have been moved to %s. This command %s in a future version. Migration guide - https://powerpipe.io/blog/migrating-from-steampipe \n", color.YellowString("Deprecation warning:"), constants.Bold("Powerpipe"), constants.Bold("will be removed"))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user