(args []any)
| 66 | } |
| 67 | |
| 68 | func argsFromUntypedSlice(args []any) ([]string, error) { |
| 69 | if len(args) == 0 { |
| 70 | return nil, errors.New("empty command array") |
| 71 | } |
| 72 | s := make([]string, 0, len(args)) |
| 73 | for _, arg := range args { |
| 74 | arg, ok := arg.(string) |
| 75 | if !ok { |
| 76 | return nil, fmt.Errorf("invalid command arg with non-string type: %v", arg) |
| 77 | } |
| 78 | s = append(s, arg) |
| 79 | } |
| 80 | return s, nil |
| 81 | } |
| 82 | |
| 83 | func (s *LifecycleScript) Execute(ctx context.Context, uid, gid int) error { |
| 84 | procAttr := &syscall.ProcAttr{ |