Skip to content

Commit

Permalink
docker compose command line arg parsing for local and module
Browse files Browse the repository at this point in the history
  • Loading branch information
rrennick committed May 8, 2020
1 parent 209b2ed commit dea4144
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/e2e/env/bin/docker-compose.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
}
Expand Down

0 comments on commit dea4144

Please sign in to comment.