mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-02 06:16:08 -04:00
Activity indicator for init command (#207)
* first version of spinner - implemented class with basic method - covered with dummy test - integrated with init command * Style and license remarks * fixed review remarks * fixed typo + integration of spinner with terminate command * integration of spinner with create command
This commit is contained in:
parent
acdcb535c0
commit
abe40de3e5
5 changed files with 175 additions and 4 deletions
|
@ -124,7 +124,8 @@ func initialize(cmd *cobra.Command, newDialer func(validator *cloudcmd.Validator
|
|||
return fmt.Errorf("parsing or generating master secret from file %s: %w", flags.masterSecretPath, err)
|
||||
}
|
||||
|
||||
cmd.Println("Initializing cluster ...")
|
||||
spinner := newSpinner(cmd, "Initializing cluster ", true)
|
||||
spinner.Start()
|
||||
req := &initproto.InitRequest{
|
||||
MasterSecret: masterSecret.Key,
|
||||
Salt: masterSecret.Salt,
|
||||
|
@ -141,6 +142,7 @@ func initialize(cmd *cobra.Command, newDialer func(validator *cloudcmd.Validator
|
|||
ConformanceMode: flags.conformance,
|
||||
}
|
||||
resp, err := initCall(cmd.Context(), newDialer(validator), flags.endpoint, req)
|
||||
spinner.Stop()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue