| 135 | } |
| 136 | |
| 137 | func checkNodeVersion(ctx context.Context) error { |
| 138 | out, err := newCmd(ctx, "node", "--version").Output() |
| 139 | if err != nil { |
| 140 | return fmt.Errorf("error executing the 'node --version' command: %w", err) |
| 141 | } |
| 142 | |
| 143 | v := version.Must(version.NewVersion(strings.TrimSpace(string(out)))) |
| 144 | minVersion := version.Must(version.NewVersion(minNodeVersion)) |
| 145 | if v.LessThan(minVersion) { |
| 146 | return fmt.Errorf("node.js version %s or higher is required", minNodeVersion) |
| 147 | } |
| 148 | |
| 149 | return nil |
| 150 | } |
| 151 | |
| 152 | func checkDocker(ctx context.Context) error { |
| 153 | out, err := newCmd(ctx, "docker", "info", "--format", "json").Output() |