Skip to content

Commit

Permalink
fixed exclude git on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
ecmel committed Jan 20, 2024
1 parent a63b5b2 commit 71b64b9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

All notable changes to the extension will be documented in this file.

## [1.0.6] - 2024-01-19
## [1.0.7] - 2024-01-20

- Ask to exclude `.git` folder

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vscode-archiver",
"displayName": "Archiver",
"description": "Workspace Folder Archiver",
"version": "1.0.6",
"version": "1.0.7",
"license": "MIT",
"publisher": "ecmel",
"author": {
Expand Down
8 changes: 4 additions & 4 deletions src/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ export async function archive() {
ignoreFiles: [".gitignore"],
});

const git = files.find((file) => file.startsWith(`.git${path.sep}`));
const git = files.find((file) => file.startsWith(".git/"));

if (git) {
const ask = await window.showQuickPick(["Yes", "No"], {
const picked = await window.showQuickPick(["Yes", "No"], {
title: "Include .git folder?",
placeHolder: "Yes",
});

if (ask === "No") {
files = files.filter((file) => !file.startsWith(`.git${path.sep}`));
if (picked === "No") {
files = files.filter((file) => !file.startsWith(".git/"));
}
}

Expand Down

0 comments on commit 71b64b9

Please sign in to comment.