diff --git a/lib/phonegap-build/create/zip.js b/lib/phonegap-build/create/zip.js index ab72acb..bba3f7c 100644 --- a/lib/phonegap-build/create/zip.js +++ b/lib/phonegap-build/create/zip.js @@ -116,7 +116,7 @@ module.exports = { // remove zip directory if empty exists = fs.existsSync(basepath); if (exists) { - fs.rmdir(basepath); + fs.rmdirSync(basepath); } } }; diff --git a/spec/phonegap-build/zip.spec.js b/spec/phonegap-build/zip.spec.js index 9a9020a..51f3d0c 100644 --- a/spec/phonegap-build/zip.spec.js +++ b/spec/phonegap-build/zip.spec.js @@ -215,7 +215,7 @@ describe('zip', function() { describe('cleanup(zipPath)', function() { beforeEach(function() { spyOn(fs, 'existsSync'); - spyOn(fs, 'rmdir'); + spyOn(fs, 'rmdirSync'); spyOn(shell, 'rm'); }); @@ -249,7 +249,7 @@ describe('zip', function() { it('should try to remove zip directory', function() { zip.cleanup('build/www.zip'); - expect(fs.rmdir).toHaveBeenCalledWith('build'); + expect(fs.rmdirSync).toHaveBeenCalledWith('build'); }); });