mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix extensions installation on Windows (#1596)
* Fix extensions installation on Windows Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com> * Get rid of readFileSync Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com> * Add missing semicolon Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
1 parent
06568fa232
commit
7b77f18376
2 files changed
+17
-8
No files matched your search
@@ -15,7 +15,7 @@ export function readFileFromTar<R = Buffer>({ tarPath, filePath, parseJson }: Re
|
||||
|
||||
await tar.list({
|
||||
file: tarPath,
|
||||
filter: path => path === filePath,
|
||||
filter: entryPath => path.normalize(entryPath) === filePath,
|
||||
onentry(entry: FileStat) {
|
||||
entry.on("data", chunk => {
|
||||
fileChunks.push(chunk);
|
||||
@@ -41,7 +41,9 @@ export async function listTarEntries(filePath: string): Promise<string[]> {
|
||||
const entries: string[] = [];
|
||||
await tar.list({
|
||||
file: filePath,
|
||||
onentry: (entry: FileStat) => entries.push(entry.path as any as string),
|
||||
onentry: (entry: FileStat) => {
|
||||
entries.push(path.normalize(entry.path as any as string));
|
||||
},
|
||||
});
|
||||
return entries;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user