@@ -264,18 +264,16 @@ function validate_files(my_path) {
264
264
/**Function used to call new child process, separated from parent. For validate_reset()
265
265
* @param {string } my_command = command to call
266
266
* @param {array } my_args - array with command arguments
267
- * @param {string } my_dir - folder
268
267
* @param {string } logpath - path to log file
269
268
* @returns {Promise } promise
270
269
*/
271
- function run_command ( my_command , my_args , my_dir , logpath ) {
270
+ function run_command ( my_command , my_args , logpath ) {
272
271
return new Promise ( function ( resolve , reject ) {
273
272
var stdio = [ 'inherit' , 'inherit' , 'inherit' ] ;
274
273
if ( logpath ) {
275
274
const out = fs . openSync ( logpath , 'a' ) ;
276
275
const err = fs . openSync ( logpath , 'a' ) ;
277
276
stdio = [ 'ignore' , out , err ] ;
278
-
279
277
}
280
278
var child = spawn ( my_command , my_args , { cwd : __dirname , shell : false , detached : true , stdio : stdio } , function ( error ) {
281
279
if ( error ) {
@@ -343,8 +341,7 @@ function validate_reset() {
343
341
var logpath = path . resolve ( __dirname , './../../../log/plugins-disable' + ( new Date ( ) . toISOString ( ) . replace ( 'T' , ':' ) ) + '.log' ) ;
344
342
345
343
var mydir = path . resolve ( __dirname + '/../scripts' ) ;
346
- run_command ( 'bash' , [ mydir + '/disable_plugins.sh' , ...pluginlist ] ,
347
- mydir , logpath )
344
+ run_command ( 'bash' , [ mydir + '/disable_plugins.sh' , ...pluginlist ] , logpath )
348
345
. then (
349
346
function ( ) {
350
347
try {
@@ -429,7 +426,7 @@ function extract_files(ext, target_path) {
429
426
if ( ext === "tar" ) {
430
427
args = [ "xf" , target_path , "-C" , path . resolve ( __dirname + '/upload/unpacked' ) ] ;
431
428
}
432
- run_command ( command , args , null , null ) . then ( function ( ) {
429
+ run_command ( command , args , null ) . then ( function ( ) {
433
430
resolve ( ) ;
434
431
} ,
435
432
function ( ) {
0 commit comments