Skip to content

Commit 278a041

Browse files
committed
refactor Binary function (utility.ts)
1 parent e9d7d53 commit 278a041

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

src/utility.ts

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,11 @@ export const Binary = function (override = false, binary = '7z') {
1515
__dirname,
1616
'..',
1717
'binaries',
18-
override === true
19-
? process.platform + sep + 'other32'
20-
: process.platform
18+
`${process.platform}${override === true ? sep + 'other32' : ''}`
2119
);
22-
let filename = isWindows() ? binary + '.exe' : binary;
23-
return {
24-
path: path,
25-
filename: filename,
26-
filepath: join(path, filename),
27-
};
20+
const filename = `${binary}${isWindows() ? '.exe' : ''}`;
21+
const filepath = join(path, filename);
22+
return { path, filename, filepath };
2823
};
2924

3025
/**

0 commit comments

Comments
 (0)