File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -198,16 +198,23 @@ gulp.task('set', function() {
198198
199199var neo4jHome = path . resolve ( './build/neo4j' ) ;
200200var neorunPath = path . resolve ( './neokit/neorun.py' ) ;
201+ var neorunStartArgsName = "--neorun.start.args" ; // use this args to provide additional args for running neorun.start
201202
202203gulp . task ( 'start-neo4j' , function ( ) {
203204
204- //var neorunArgs = minimist(process.argv.slice(2), { string: 'opts' }).opts;
205- var neorunArgs ;
206- neorunArgs = neorunArgs || '-v 3.0.1 -p neo4j' ;
205+ var neorunStartArgs = '-p neo4j' ; // default args to neorun.start: change the default password to neo4j
206+ process . argv . slice ( 2 ) . forEach ( function ( val ) {
207+ if ( val . startsWith ( neorunStartArgsName ) )
208+ {
209+ neorunStartArgs = val . split ( "=" ) [ 1 ] ;
210+ }
211+ } ) ;
212+
213+ neorunStartArgs = neorunStartArgs . match ( / \S + / g) || '' ;
207214
208215 return runScript ( [
209216 neorunPath , '--start=' + neo4jHome
210- ] . concat ( neorunArgs . split ( " " ) ) ) ;
217+ ] . concat ( neorunStartArgs ) ) ;
211218} ) ;
212219
213220gulp . task ( 'stop-neo4j' , function ( ) {
Original file line number Diff line number Diff line change @@ -7,5 +7,6 @@ trap finish EXIT
77
88npm install
99npm run start-neo4j
10+ # npm run start-neo4j -- --neorun.start.args='-v 3.0.1 -p neo4j'
1011sleep 2
1112npm test
You can’t perform that action at this time.
0 commit comments