Skip to content

Commit 0d8cda5

Browse files
authored
Merge pull request #21 from navarasu/fix_17
#17 Fixed issue in remove directory
2 parents 1ff9486 + f9f7a93 commit 0d8cda5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/bundle.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function cleanBuild(){
2727
this.cli.log("Cleaning ruby layer build")
2828
this.ruby_layer = path.join(this.servicePath,'.serverless','ruby_layer')
2929
if (fs.pathExistsSync(this.ruby_layer)){
30-
fs.rmdirSync(this.ruby_layer, { recursive: true })
30+
fs.removeSync(this.ruby_layer)
3131
}
3232
}
3333
function bundleInstall(){
@@ -120,7 +120,7 @@ function addFiletoZip(zip, dir_path, file_name){
120120

121121
function zipBundleFolder() {
122122
this.gem_folder= fs.readdirSync(path.join(this.build_path,'ruby'))[0]
123-
fs.rmdirSync(path.join(this.build_path,'ruby',this.gem_folder,'cache'),{ recursive: true })
123+
fs.removeSync(path.join(this.build_path,'ruby',this.gem_folder,'cache'))
124124
const platform = process.platform == 'win32' ? 'DOS' : 'UNIX'
125125
return zipDir(this.build_path,
126126
path.join(this.ruby_layer, 'gemLayer.zip'),

0 commit comments

Comments
 (0)