We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
guest.chown
1 parent 6faf9b2 commit b40a2acCopy full SHA for b40a2ac
cli/vm/guest/chown.go
@@ -74,22 +74,24 @@ func (cmd *chown) Run(ctx context.Context, f *flag.FlagSet) error {
74
return flag.ErrHelp
75
}
76
77
- id, err := strconv.Atoi(ids[0])
+ ownerIDStr := ids[0]
78
+ ownerID, err := strconv.Atoi(ownerIDStr)
79
if err != nil {
80
return err
81
82
83
attr.OwnerId = new(int32)
- *attr.OwnerId = int32(id)
84
+ *attr.OwnerId = int32(ownerID)
85
86
if len(ids) == 2 {
- id, err = strconv.Atoi(ids[1])
87
+ groupIDStr := ids[1]
88
+ groupID, err := strconv.Atoi(groupIDStr)
89
90
91
92
93
attr.GroupId = new(int32)
- *attr.GroupId = int32(id)
94
+ *attr.GroupId = int32(groupID)
95
96
97
return m.ChangeFileAttributes(ctx, cmd.Auth(), f.Arg(1), &attr)
0 commit comments