File tree Expand file tree Collapse file tree 2 files changed +4
-11
lines changed Expand file tree Collapse file tree 2 files changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -152,6 +152,7 @@ rules:
152
152
}]
153
153
no-tabs : error
154
154
no-trailing-spaces : error
155
+ no-unsafe-finally : error
155
156
object-curly-spacing : [error, always]
156
157
one-var-declaration-per-line : error
157
158
operator-linebreak : [error, after]
Original file line number Diff line number Diff line change @@ -504,21 +504,13 @@ exports.canCreateSymLink = function() {
504
504
const whoamiPath = path . join ( process . env [ 'SystemRoot' ] ,
505
505
'System32' , 'whoami.exe' ) ;
506
506
507
- let err = false ;
508
- let output = '' ;
509
-
510
507
try {
511
- output = execSync ( `${ whoamiPath } /priv` , { timout : 1000 } ) ;
508
+ const output = execSync ( `${ whoamiPath } /priv` , { timout : 1000 } ) ;
509
+ return output . includes ( 'SeCreateSymbolicLinkPrivilege' ) ;
512
510
} catch ( e ) {
513
- err = true ;
514
- } finally {
515
- if ( err || ! output . includes ( 'SeCreateSymbolicLinkPrivilege' ) ) {
516
- return false ;
517
- }
511
+ return false ;
518
512
}
519
513
}
520
-
521
- return true ;
522
514
} ;
523
515
524
516
exports . getCallSite = function getCallSite ( top ) {
You can’t perform that action at this time.
0 commit comments