Skip to content

Commit fb8b62e

Browse files
committed
Allow to read runtime information from zip files.
This reads metadata information generated by zip-it-and-ship-it to send the right runtime information when uploading zipped functions. Signed-off-by: David Calavera <[email protected]>
1 parent e1293e3 commit fb8b62e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

go/porcelain/deploy.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,9 @@ func readZipRuntime(filePath string) (string, error) {
641641

642642
if strings.HasPrefix(line, "runtime=") {
643643
split := strings.SplitN(line, "=", 2)
644-
return split[1], nil
644+
if len(split) == 2 && split[1] != "" {
645+
return split[1], nil
646+
}
645647
}
646648
}
647649
}

0 commit comments

Comments
 (0)