Skip to content

Commit 0e9cb5a

Browse files
committed
More logging
1 parent 65f32a0 commit 0e9cb5a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/package.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2045,7 +2045,7 @@ export async function printAndValidatePackagedFiles(files: IFile[], cwd: string,
20452045
getDefaultPackageName(manifest, options),
20462046
files.map(f => ({
20472047
// File path relative to the extension root
2048-
origin: !isInMemoryFile(f) ? f.localPath : path.join(cwd, util.vsixPathToFilePath(f.path)),
2048+
origin: !isInMemoryFile(f) ? f.localPath : util.vsixPathToFilePath(f.path),
20492049
// File path in the VSIX
20502050
tree: f.path
20512051
})),

src/util.ts

+4
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,10 @@ export async function generateFileStructureTree(rootFolder: string, filePaths: {
284284
const parts = filePath.split('/');
285285
let currentLevel = folderTree;
286286
parts.forEach(part => {
287+
if (currentLevel === undefined) {
288+
throw new Error(`currentLevel is undefined for ${part} in ${filePath}`);
289+
}
290+
287291
if (typeof currentLevel[part] === 'number') {
288292
currentLevel[part] = size;
289293
} else if (currentLevel[part]) {

0 commit comments

Comments
 (0)