-
-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes Dockerless build fails to run in Linux #76 #77
Fixes Dockerless build fails to run in Linux #76 #77
Conversation
Nice catch! |
I'm not sure why but after merging this I'm ci permission errors in ci when attempting |
I'll take a closer look tomorrow |
@marcellourbani after going back and forth on this I think the issue you might have seen might have been related to a different factor. I did some more experimentation and eventual came to the conclusion that the |
@softprops this is interesting! The code in my PR is correct, but fails because adm_zip has a bug I opened a bug with them about this, works ok if the first byte is a 6 but not for a 7: var AdmZip = require("adm-zip")
var zip = new AdmZip()
var content = "inner content of the file"
var buffer = Buffer.alloc(content.length, content)
zip.addFile("0o644.txt", buffer, "", 0o644 << 16)
zip.addFile("0o655.txt", buffer, "", 0o655 << 16)
zip.addFile("0o677.txt", buffer, "", 0o677 << 16)
zip.addFile("0o777.txt", buffer, "", 0o777 << 16)
zip.addFile("0o755.txt", buffer, "", 0o755 << 16)
zip.writeZip("./testattr.zip") zipinfo testattr.zip
Archive: testattr.zip
Zip file size: 627 bytes, number of entries: 5
?rw-r--r-- 1.0 fat 25 b- defN 20-Jul-05 11:01 0o644.txt
?rw-r-xr-x 1.0 fat 25 b- defN 20-Jul-05 11:01 0o655.txt
?rw-rwxrwx 1.0 fat 25 b- defN 20-Jul-05 11:01 0o677.txt
-rw---- 1.0 fat 25 b- defN 20-Jul-05 11:01 0o755.txt
-rw---- 1.0 fat 25 b- defN 20-Jul-05 11:01 0o777.txt
5 files, 125 bytes uncompressed, 135 bytes compressed: -8.0% Options:
var yazl = require("yazl")
var fs = require("fs")
var zip2 = new yazl.ZipFile()
zip2.addBuffer(buffer, "0o644.txt", { mode: 0o100644 })
zip2.addBuffer(buffer, "0o655.txt", { mode: 0o100655 })
zip2.addBuffer(buffer, "0o677.txt", { mode: 0o100677 })
zip2.addBuffer(buffer, "0o777.txt", { mode: 0o100777 })
zip2.addBuffer(buffer, "0o755.txt", { mode: 0o100755 })
zip2.outputStream
.pipe(fs.createWriteStream("testattr_yazl.zip"))
.on("close", () => {
exec("zipinfo ./testattr_yazl.zip", (e, o) => console.log(o))
})
zip2.end() zipinfo testattr_yazl.zip
Archive: testattr_yazl.zip
Zip file size: 627 bytes, number of entries: 5
-rw-r--r-- 6.3 unx 25 b- defN 20-Jul-05 11:09 0o644.txt
-rw-r-xr-x 6.3 unx 25 b- defN 20-Jul-05 11:09 0o655.txt
-rw-rwxrwx 6.3 unx 25 b- defN 20-Jul-05 11:09 0o677.txt
-rwxrwxrwx 6.3 unx 25 b- defN 20-Jul-05 11:09 0o777.txt
-rwxr-xr-x 6.3 unx 25 b- defN 20-Jul-05 11:09 0o755.txt
5 files, 125 bytes uncompressed, 135 bytes compressed: -8.0% Tempted to send another PR to migrate to yazl if you're interested |
Ok. Could you start with a failing test? The correct fix for me results in a deployable lambda. The current tests capture building on Linux and invoking in a lambda like environment. I'd be more interested in learning where this is failing for you and how to reproduce that before attempting another change. |
Here is where I'm logging the permissions
|
What did you implement:
Closes: #76
How did you verify your change:
Ran it on my own function which originated the bug
What (if anything) would need to be called out in the CHANGELOG for the next release:
Nothing
Short note: