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 {
43
43
44
44
Examples:
45
45
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`
47
48
}
48
49
49
50
func (cmd * set ) Usage () string {
@@ -67,6 +68,13 @@ func (cmd *set) Run(ctx context.Context, f *flag.FlagSet) error {
67
68
68
69
task := object .NewTask (c , ref )
69
70
71
+ if cmd .progress != 0 {
72
+ err := task .UpdateProgress (ctx , cmd .progress )
73
+ if err != nil {
74
+ return err
75
+ }
76
+ }
77
+
70
78
var fault * types.LocalizedMethodFault
71
79
72
80
if cmd .err != "" {
@@ -84,13 +92,6 @@ func (cmd *set) Run(ctx context.Context, f *flag.FlagSet) error {
84
92
}
85
93
}
86
94
87
- if cmd .progress != 0 {
88
- err := task .UpdateProgress (ctx , cmd .progress )
89
- if err != nil {
90
- return err
91
- }
92
- }
93
-
94
95
if cmd .desc .Key != "" {
95
96
err := task .SetDescription (ctx , cmd .desc )
96
97
if err != nil {
You can’t perform that action at this time.
0 commit comments