Passed
Push — main ( 7025c8...8c0a07 )
by Bjarn
03:07 queued 01:44
created

src/commands/useCommand.ts

Complexity

Total Complexity 0
Complexity/F 0

Size

Lines of Code 9
Function Count 0

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 9
c 0
b 0
f 0
wmc 0
mnd 0
bc 0
fnc 0
bpm 0
cpm 0
noi 0
1
import commander from 'commander'
2
import UseController from '../controllers/useController'
3
4
export default (program: typeof commander): commander.Command => program
5
    .command('use <service> <version>')
6
    .description('Switch a version of a specific service, i.e. use PHP 7.4 instead of 7.2.')
7
    .action((service: string, version: string) => {
8
        (new UseController()).execute(service, version).catch(err => console.log(err.message))
9
    })