mirror of
https://github.com/kairos-io/kairos-agent.git
synced 2025-09-09 04:49:14 +00:00
Expose the Analize method of yip (#548)
This only shows for a given stage what steps would be run and in which order Signed-off-by: Itxaka <itxaka@kairos.io>
This commit is contained in:
8
main.go
8
main.go
@@ -667,6 +667,11 @@ The validate command expects a configuration file as its only argument. Local fi
|
||||
Name: "cloud-init-paths",
|
||||
Usage: "Extra paths to add to the run stage",
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "analyze",
|
||||
Usage: "Only print the modules that would run in the order they would run",
|
||||
Aliases: []string{"a"},
|
||||
},
|
||||
},
|
||||
Before: func(c *cli.Context) error {
|
||||
if c.Args().Len() != 1 {
|
||||
@@ -692,6 +697,9 @@ The validate command expects a configuration file as its only argument. Local fi
|
||||
if err != nil {
|
||||
config.Logger.Errorf("Error reading config: %s\n", err)
|
||||
}
|
||||
if c.Bool("analyze") {
|
||||
return utils.RunStageAnalyze(config, stage)
|
||||
}
|
||||
return utils.RunStage(config, stage)
|
||||
},
|
||||
},
|
||||
|
Reference in New Issue
Block a user