@@ -746,7 +746,7 @@ func bundle(ctx context.Context, functionDir string, observer DeployObserver) (*
746746 }
747747 functions .Add (file .Name , file )
748748 case goFile (filePath , i , observer ):
749- file , err := newFunctionFile (filePath , i , goRuntime , nil , observer )
749+ file , err := newFunctionFile (filePath , i , amazonLinux2 , nil , observer )
750750 if err != nil {
751751 return nil , nil , nil , err
752752 }
@@ -975,14 +975,7 @@ func ignoreFile(rel string, ignoreInstallDirs bool) bool {
975975}
976976
977977func createHeader (archive * zip.Writer , i os.FileInfo , runtime string ) (io.Writer , error ) {
978- if runtime == goRuntime {
979- return archive .CreateHeader (& zip.FileHeader {
980- CreatorVersion : 3 << 8 , // indicates Unix
981- ExternalAttrs : 0777 << 16 , // -rwxrwxrwx file permissions
982- Name : i .Name (),
983- Method : zip .Deflate ,
984- })
985- } else if runtime == amazonLinux2 {
978+ if runtime == goRuntime || runtime == amazonLinux2 {
986979 return archive .CreateHeader (& zip.FileHeader {
987980 CreatorVersion : 3 << 8 , // indicates Unix
988981 ExternalAttrs : 0777 << 16 , // -rwxrwxrwx file permissions
0 commit comments