Skip to content

Commit

Permalink
More logging
Browse files Browse the repository at this point in the history
  • Loading branch information
benibenj committed Sep 4, 2024
1 parent 65f32a0 commit 0e9cb5a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2045,7 +2045,7 @@ export async function printAndValidatePackagedFiles(files: IFile[], cwd: string,
getDefaultPackageName(manifest, options),
files.map(f => ({
// File path relative to the extension root
origin: !isInMemoryFile(f) ? f.localPath : path.join(cwd, util.vsixPathToFilePath(f.path)),
origin: !isInMemoryFile(f) ? f.localPath : util.vsixPathToFilePath(f.path),
// File path in the VSIX
tree: f.path
})),
Expand Down
4 changes: 4 additions & 0 deletions src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,10 @@ export async function generateFileStructureTree(rootFolder: string, filePaths: {
const parts = filePath.split('/');
let currentLevel = folderTree;
parts.forEach(part => {
if (currentLevel === undefined) {
throw new Error(`currentLevel is undefined for ${part} in ${filePath}`);
}

if (typeof currentLevel[part] === 'number') {
currentLevel[part] = size;
} else if (currentLevel[part]) {
Expand Down

0 comments on commit 0e9cb5a

Please sign in to comment.