(target string)
| 133 | } |
| 134 | |
| 135 | func (m msys2) install(target string) error { |
| 136 | title := fmt.Sprintf("[pacman -S %s]", target) |
| 137 | executor := cmd.NewExecutor(title, "pacman --noconfirm -S "+target) |
| 138 | executor.MSYS2Env(true) |
| 139 | if err := executor.Execute(); err != nil { |
| 140 | return fmt.Errorf("install %s into msys2: %s", target, err) |
| 141 | } |
| 142 | |
| 143 | // Record installed state. |
| 144 | if err := m.markAsInstalled(target); err != nil { |
| 145 | return fmt.Errorf("record installed state: %s", err) |
| 146 | } |
| 147 | |
| 148 | return nil |
| 149 | } |
| 150 | |
| 151 | func (m msys2) markAsInstalled(target string) error { |
| 152 | var newCreated bool |
no test coverage detected