Skip to content

Commit

Permalink
Fix deleting submodules
Browse files Browse the repository at this point in the history
  • Loading branch information
sjchmiela committed Feb 5, 2025
1 parent b3d0924 commit a952021
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/eas-cli/src/vcs/clients/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,11 @@ export default class GitClient extends Client {
.filter(file => file !== '');

await Promise.all(
cachedFilesWeShouldHaveIgnored.map(file => fs.rm(path.join(destinationPath, file)))
cachedFilesWeShouldHaveIgnored.map(file =>
// `ls-files` does not go over files within submodules. If submodule is
// ignored, it is listed as a single path, so we need to `rm -rf` it.
fs.rm(path.join(destinationPath, file), { recursive: true, force: true })
)
);

// Special-case `.git` which `git ls-files` will never consider ignored.
Expand Down

0 comments on commit a952021

Please sign in to comment.