itchio / butler

🎩 Command-line itch.io helper
MIT License
744 stars 55 forks source link

Push fails when --if-changed flag is provided using a zip file as the source. #228

Open rsethc opened 2 years ago

rsethc commented 2 years ago

Using the --if-changed flag against a zip archive causes Butler to fail, whereas simply omitting the flag results in a successful push. While I suspect it's specific to zip archives (due to the "lstat ...: not a directory" text) I have not done further testing to prove that. This particular zip archive contains, at the top level, no files and one folder 'built' which contains game files within it (I can provide the archive itself, if this would help).

> Comparing against previous build...
checking for differences: lstat game.zip/built: not a directory
The command '/bin/sh -c butler push game.zip glassblade/kringle-logistics:windows --if-changed' returned a non-zero code: 1

Perhaps the error text itself is originating from here: https://github.com/itchio/butler/blob/cdcf41905bdc9b73048d182706a31f693dec2117/cmd/push/push.go#L195

bend-n commented 2 years ago

can confirm, had to create my own diffing system (there were issues with directorys for me)