File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -126,17 +126,23 @@ class PackageRubyBundlePlugin {
126126    const  localPath  =  this . serverless . config . servicePath ; 
127127    const  imageTag  =  this . serverless . service . provider . runtime . slice ( - 3 ) ; 
128128    const  dockerImage  =  `amazon/aws-lambda-ruby:${ imageTag }  ` ; 
129-     const  command  =  `docker run --rm \ 
130-                                 --volume "${ localPath }  :/var/task" \ 
131-                                 --entrypoint '/bin/bash' \ 
132-                                 ${ dockerImage }   \ 
133-                                 '/var/task/node_modules/serverless-ruby-package/build-gems.sh'` 
129+     const  default_command  =  `docker run --rm \ 
130+                                         --volume "${ localPath }  :/var/task" \ 
131+                                         --entrypoint '/bin/bash' \ 
132+                                         ${ dockerImage }   \ 
133+                                         '/var/task/node_modules/serverless-ruby-package/build-gems.sh'` 
134+     const  command  =  process . env . SRP_DOCKER_COMMAND  ||  default_command ; 
134135
135136    if  ( this . config . debug ) { 
137+       this . log ( `local path: ${ localPath }  ` ) ; 
138+       this . log ( `image tag: ${ imageTag }  ` ) ; 
136139      this . log ( `docker image: ${ dockerImage }  ` ) ; 
137-       this . log ( `command: ${ command }  ` ) ; 
140+       this . log ( `docker command: ${ command }  ` ) ; 
141+     } 
142+     const  output  =  execSync ( command ) 
143+     if  ( this . config . debug )  { 
144+       this . log ( `docker command output: ${ output }  ` ) ; 
138145    } 
139-     execSync ( command ) 
140146  } 
141147
142148  warnOnUnsupportedRuntime ( ) { 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments