File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed
Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,8 @@ func (cmd *set) Description() string {
4343
4444Examples:
4545 id=$(govc task.create com.vmware.govmomi.simulator.test)
46- govc task.set $id -s error`
46+ govc task.set $id -s error
47+ govc task.set $id -p 100 -s success`
4748}
4849
4950func (cmd * set ) Usage () string {
@@ -67,6 +68,13 @@ func (cmd *set) Run(ctx context.Context, f *flag.FlagSet) error {
6768
6869 task := object .NewTask (c , ref )
6970
71+ if cmd .progress != 0 {
72+ err := task .UpdateProgress (ctx , cmd .progress )
73+ if err != nil {
74+ return err
75+ }
76+ }
77+
7078 var fault * types.LocalizedMethodFault
7179
7280 if cmd .err != "" {
@@ -84,13 +92,6 @@ func (cmd *set) Run(ctx context.Context, f *flag.FlagSet) error {
8492 }
8593 }
8694
87- if cmd .progress != 0 {
88- err := task .UpdateProgress (ctx , cmd .progress )
89- if err != nil {
90- return err
91- }
92- }
93-
9495 if cmd .desc .Key != "" {
9596 err := task .SetDescription (ctx , cmd .desc )
9697 if err != nil {
You can’t perform that action at this time.
0 commit comments