Skip to content

Commit 4d7ee02

Browse files
committed
1 parent 7182cba commit 4d7ee02

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

extensions/github/src/publish.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,11 @@ export async function publishRepository(gitAPI: GitAPI, repository?: Repository)
140140
const ignored = new Set(children);
141141
result.forEach(c => ignored.delete(c.label));
142142

143-
if (ignored.size === 0) {
144-
return;
143+
if (ignored.size > 0) {
144+
const raw = [...ignored].map(i => `/${i}`).join('\n');
145+
const encoder = new TextEncoder();
146+
await vscode.workspace.fs.writeFile(gitignore, encoder.encode(raw));
145147
}
146-
147-
const raw = [...ignored].map(i => `/${i}`).join('\n');
148-
const encoder = new TextEncoder();
149-
await vscode.workspace.fs.writeFile(gitignore, encoder.encode(raw));
150148
} finally {
151149
quickpick.dispose();
152150
}

0 commit comments

Comments
 (0)