Skip to content

Only create installer directory when .vsix files exist#156

Draft
Copilot wants to merge 2 commits intomasterfrom
copilot/add-logs-condition-check
Draft

Only create installer directory when .vsix files exist#156
Copilot wants to merge 2 commits intomasterfrom
copilot/add-logs-condition-check

Conversation

Copy link
Contributor

Copilot AI commented Feb 6, 2026

The build script was creating an empty installer/ directory unconditionally during package builds, even when no .vsix files were present to move.

Changes

  • Collect .vsix files before directory creation
  • Gate installer/ directory creation on vsixFiles.length > 0
  • Move file processing inside conditional block
// Before: always creates installer/
if (!fs.existsSync(installerDir)) {
    fs.mkdirSync(installerDir);
}
fs.readdirSync('.').filter(f => f.endsWith('.vsix')).forEach(...)

// After: only creates installer/ when needed
const vsixFiles = fs.readdirSync('.').filter(f => f.endsWith('.vsix'));
if (vsixFiles.length > 0) {
    if (!fs.existsSync(installerDir)) {
        fs.mkdirSync(installerDir);
    }
    vsixFiles.forEach(...)
}
Original prompt

only add if logs contains files


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: norschel <12895005+norschel@users.noreply.github.com>
Copilot AI changed the title [WIP] Add condition to check if logs contain files Only create installer directory when .vsix files exist Feb 6, 2026
Copilot AI requested a review from norschel February 6, 2026 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants