File tree 2 files changed +9
-3
lines changed 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -214,7 +214,7 @@ Common.prepareAppConf = function(opts, app) {
214
214
215
215
if ( ( f == 'log' && typeof af == 'boolean' && af ) || ( f != 'log' && ! af ) ) {
216
216
ps = [ cst [ 'DEFAULT_' + ext . toUpperCase ( ) + '_PATH' ] , formated_app_name + ( isStd ? '-' + f : '' ) + '.' + ext ] ;
217
- } else if ( f != 'log' || ( f == 'log' && af ) ) {
217
+ } else if ( ( f != 'log' || ( f == 'log' && af ) ) && af !== 'NULL' && af !== '/dev/null' ) {
218
218
ps = [ cwd , af ] ;
219
219
220
220
var dir = path . dirname ( path . resolve ( cwd , af ) ) ;
@@ -233,7 +233,13 @@ Common.prepareAppConf = function(opts, app) {
233
233
234
234
}
235
235
// PM2 paths
236
- ps && ( app [ 'pm_' + ( isStd ? f . substr ( 0 , 3 ) + '_' : '' ) + ext + '_path' ] = path . resolve . apply ( null , ps ) ) ;
236
+ if ( af !== 'NULL' && af !== '/dev/null' ) {
237
+ ps && ( app [ 'pm_' + ( isStd ? f . substr ( 0 , 3 ) + '_' : '' ) + ext + '_path' ] = path . resolve . apply ( null , ps ) ) ;
238
+ } else if ( path . sep === '\\' ) {
239
+ app [ 'pm_' + ( isStd ? f . substr ( 0 , 3 ) + '_' : '' ) + ext + '_path' ] = '\\\\.\\NUL' ;
240
+ } else {
241
+ app [ 'pm_' + ( isStd ? f . substr ( 0 , 3 ) + '_' : '' ) + ext + '_path' ] = '/dev/null' ;
242
+ }
237
243
delete app [ f + '_file' ] ;
238
244
} ) ;
239
245
Original file line number Diff line number Diff line change @@ -260,7 +260,7 @@ var Utility = module.exports = {
260
260
} ,
261
261
262
262
checkPathIsNull : function ( path ) {
263
- return path === 'NULL' || path === '/dev/null' ;
263
+ return path === 'NULL' || path === '/dev/null' || path === '\\\\.\\NUL' ;
264
264
} ,
265
265
266
266
generateUUID : function ( ) {
You can’t perform that action at this time.
0 commit comments