File tree 1 file changed +10
-0
lines changed
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import (
11
11
log "github.com/sirupsen/logrus"
12
12
"go.amzn.com/lambda/interop"
13
13
"go.amzn.com/lambda/rapidcore"
14
+ "golang.org/x/sys/unix"
14
15
"io"
15
16
"io/fs"
16
17
"math"
@@ -77,6 +78,15 @@ func getBootstrap(args []string) (*rapidcore.Bootstrap, string) {
77
78
log .Panic ("insufficient arguments: bootstrap not provided" )
78
79
}
79
80
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
+
80
90
return rapidcore .NewBootstrapSingleCmd (bootstrapLookupCmd , currentWorkingDir ), handler
81
91
}
82
92
You can’t perform that action at this time.
0 commit comments