File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import (
1111 log "github.com/sirupsen/logrus"
1212 "go.amzn.com/lambda/interop"
1313 "go.amzn.com/lambda/rapidcore"
14+ "golang.org/x/sys/unix"
1415 "io"
1516 "io/fs"
1617 "math"
@@ -77,6 +78,15 @@ func getBootstrap(args []string) (*rapidcore.Bootstrap, string) {
7778 log .Panic ("insufficient arguments: bootstrap not provided" )
7879 }
7980
81+ err := unix .Access (bootstrapLookupCmd [0 ], unix .X_OK )
82+ if err != nil {
83+ log .Debug ("Bootstrap not executable, setting permissions to 0755..." , bootstrapLookupCmd [0 ])
84+ err = os .Chmod (bootstrapLookupCmd [0 ], 0755 )
85+ if err != nil {
86+ log .Warn ("Error setting bootstrap to 0755 permissions: " , bootstrapLookupCmd [0 ], err )
87+ }
88+ }
89+
8090 return rapidcore .NewBootstrapSingleCmd (bootstrapLookupCmd , currentWorkingDir ), handler
8191}
8292
You can’t perform that action at this time.
0 commit comments