| Total Complexity | 1 |
| Complexity/F | 1 |
| Lines of Code | 11 |
| Function Count | 1 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import commander from 'commander' |
||
| 2 | import UseController from '../controllers/useController' |
||
| 3 | |||
| 4 | export default function useCommand(program: typeof commander) { |
||
| 5 | return program |
||
| 6 | .command('use <service> <version>') |
||
| 7 | .description('Switch a version of a specific service, i.e. use PHP 7.4 instead of 7.2.') |
||
| 8 | .action((service: string, version: string) => { |
||
| 9 | (new UseController()).execute(service, version).catch(err => console.log(err.message)) |
||
| 10 | }) |
||
| 11 | } |