You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2017/12/06 06:41:26 UTC

[cordova-browser] 02/04: CB-13614 create intermediate file paths

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

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

commit 64a3b432936e400f33b0ee6b00034365fe44ce01
Author: George Campbell <ca...@oclc.org>
AuthorDate: Thu Nov 30 14:01:51 2017 -0500

    CB-13614 create intermediate file paths
---
 bin/template/cordova/browser_handler.js | 2 +-
 spec/browser_handler.spec.js            | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/bin/template/cordova/browser_handler.js b/bin/template/cordova/browser_handler.js
index 4446bf0..da1be3f 100644
--- a/bin/template/cordova/browser_handler.js
+++ b/bin/template/cordova/browser_handler.js
@@ -121,7 +121,7 @@ module.exports = {
                 shell.cp('-Rf', src + '/*', dest);
             } else {
                 if (path.parse(asset.target).dir !== '') {
-                    shell.mkdir(path.parse(dest).dir);
+                    shell.mkdir('-p', path.parse(dest).dir);
                 }
                 shell.cp('-f', src, dest);
             }
diff --git a/spec/browser_handler.spec.js b/spec/browser_handler.spec.js
index 31e91ef..4f9145e 100644
--- a/spec/browser_handler.spec.js
+++ b/spec/browser_handler.spec.js
@@ -63,7 +63,7 @@ describe('Asset install tests', function () {
         };
         spyOn(fs, 'statSync').and.returnValue(fsstatMock);
         browser_handler.asset.install(assetPath, plugin_dir, wwwDest);
-        expect(mkdir).toHaveBeenCalledWith('dest/js/deepdown');
+        expect(mkdir).toHaveBeenCalledWith('-p', 'dest/js/deepdown');
         expect(cp).toHaveBeenCalledWith('-f', 'pluginDir/someSrc/reformat.js', 'dest/js/deepdown/reformat.js');
     });
 });

-- 
To stop receiving notification emails like this one, please contact
"commits@cordova.apache.org" <co...@cordova.apache.org>.

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