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() {
198
198
199
199
var neo4jHome = path . resolve ( './build/neo4j' ) ;
200
200
var neorunPath = path . resolve ( './neokit/neorun.py' ) ;
201
+ var neorunStartArgsName = "--neorun.start.args" ; // use this args to provide additional args for running neorun.start
201
202
202
203
gulp . task ( 'start-neo4j' , function ( ) {
203
204
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) || '' ;
207
214
208
215
return runScript ( [
209
216
neorunPath , '--start=' + neo4jHome
210
- ] . concat ( neorunArgs . split ( " " ) ) ) ;
217
+ ] . concat ( neorunStartArgs ) ) ;
211
218
} ) ;
212
219
213
220
gulp . task ( 'stop-neo4j' , function ( ) {
Original file line number Diff line number Diff line change @@ -7,5 +7,6 @@ trap finish EXIT
7
7
8
8
npm install
9
9
npm run start-neo4j
10
+ # npm run start-neo4j -- --neorun.start.args='-v 3.0.1 -p neo4j'
10
11
sleep 2
11
12
npm test
You can’t perform that action at this time.
0 commit comments