Skip to content

Commit

Permalink
fix: uninstall plugin with asset tag (#1446)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcesarmobile authored Jul 11, 2024
1 parent 80024fd commit ffb22fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/plugman/pluginHandlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ function removeFile (project_dir, src) {

// deletes file/directory without checking
function removeFileF (file) {
fs.rmSync(file);
fs.rmSync(file, { recursive: true, force: true });
}

function removeFileAndParents (baseDir, destFile, stopper) {
Expand Down
6 changes: 3 additions & 3 deletions tests/spec/unit/Plugman/pluginHandler.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -565,13 +565,13 @@ describe('ios plugin handler', () => {

it('Test 042 : should put module to both www and platform_www when options.usePlatformWww flag is specified', () => {
uninstall(jsModule, dummyPluginInfo, dummyProject, { usePlatformWww: true });
expect(fs.rmSync).toHaveBeenCalledWith(wwwDest);
expect(fs.rmSync).toHaveBeenCalledWith(platformWwwDest);
expect(fs.rmSync).toHaveBeenCalledWith(wwwDest, { recursive: true, force: true });
expect(fs.rmSync).toHaveBeenCalledWith(platformWwwDest, { recursive: true, force: true });
});

it('Test 043 : should put module to www only when options.usePlatformWww flag is not specified', () => {
uninstall(jsModule, dummyPluginInfo, dummyProject);
expect(fs.rmSync).toHaveBeenCalledWith(wwwDest);
expect(fs.rmSync).toHaveBeenCalledWith(wwwDest, { recursive: true, force: true });
expect(fs.rmSync).not.toHaveBeenCalledWith(platformWwwDest);
});
});
Expand Down

0 comments on commit ffb22fe

Please sign in to comment.