File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -329,11 +329,11 @@ export const listArchive =
329
329
// Create a string that can be parsed by `run`.
330
330
let command = 'l "' + filepath + '" ' ;
331
331
// Start the command
332
- const executables = [ '7z' , '7za' ] ;
333
- let position = isWindows ( ) ? 0 : 1 ; // Windows - 2 attempts, others - 1 attempt
332
+ const executables = isWindows ( ) ? [ '7z' , '7za' ] : [ '7za' ] ;
333
+ let position = 0 ;
334
334
const runner = ( ) => Run ( executables [ position ] , command , options , override )
335
335
. progress ( ( data : string ) => progress ( onprogress ( data ) ) )
336
- . then ( ( args : any ) => resolve ( position === 1 && isWindows ( ) ? args : spec ) )
336
+ . then ( ( args : any ) => resolve ( position === 0 ? spec : args ) )
337
337
. catch ( ( err : any ) => {
338
338
if ( position === executables . length - 1 ) return reject ( err ) ;
339
339
console . error ( 'ListArchive failed using `' + executables [ position ] +
You can’t perform that action at this time.
0 commit comments