docker compose command line arg parsing for local and module

This commit is contained in:
Ron Rennick 2020-05-08 16:26:30 -03:00
parent 209b2edea9
commit dea4144be2
1 changed files with 3 additions and 2 deletions

View File

@ -13,12 +13,13 @@ program
.command( 'up', 'Start and build the Docker container' )
.command( 'down', 'Stop the Docker container and remove volumes' )
.action( ( cmd, options ) => {
if ( 'up' === options[ 0 ] ) {
arg = options.args ? options.args[ 0 ] : options[ 0 ];
if ( 'up' === arg ) {
command = 'up';
dockerArgs.push( 'up', '--build', '-d' );
}
if ( 'down' === options[ 0 ] ) {
if ( 'down' === arg ) {
command = 'down';
dockerArgs.push( 'down', '-v' );
}