You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by er...@apache.org on 2024/07/11 04:33:51 UTC

(cordova-ios) branch master updated: fix: uninstall plugin with asset tag (#1446)

This is an automated email from the ASF dual-hosted git repository.

erisu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-ios.git


The following commit(s) were added to refs/heads/master by this push:
     new ffb22fed fix: uninstall plugin with asset tag (#1446)
ffb22fed is described below

commit ffb22fed9fc2a2f6282ea9e5f7b55713e9a4fc76
Author: jcesarmobile <jc...@gmail.com>
AuthorDate: Thu Jul 11 06:33:46 2024 +0200

    fix: uninstall plugin with asset tag (#1446)
---
 lib/plugman/pluginHandlers.js                 | 2 +-
 tests/spec/unit/Plugman/pluginHandler.spec.js | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/plugman/pluginHandlers.js b/lib/plugman/pluginHandlers.js
index 7cd55ba1..859dc217 100644
--- a/lib/plugman/pluginHandlers.js
+++ b/lib/plugman/pluginHandlers.js
@@ -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) {
diff --git a/tests/spec/unit/Plugman/pluginHandler.spec.js b/tests/spec/unit/Plugman/pluginHandler.spec.js
index 682a5f94..ca485308 100644
--- a/tests/spec/unit/Plugman/pluginHandler.spec.js
+++ b/tests/spec/unit/Plugman/pluginHandler.spec.js
@@ -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);
             });
         });


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org