Permalink
Browse files

Sometimes unzip returns 1 even when it succeeds?!

The file that exhibits this:
packages/0356 - dbext.vim/2008-04-28 6.00 dbext_600.zip
  • Loading branch information...
1 parent f7b6ca0 commit 8627a4d17abe5a8ffd55d4874c4cc3280578dc29 @bronson bronson committed Sep 11, 2010
Showing with 4 additions and 4 deletions.
  1. +0 −3 NOTES
  2. +4 −1 scraper
View
@@ -1,8 +1,5 @@
Known bugs:
-Get rid of all the raises when creating a repo
-Add RSS parsing
-
http://github.com/schwern/gitpan/issues#issue/47
make it clearer in the description that this is not the dev repository
"Archive of Foo-Bar releases. NOT THE DEVELOPMENT REPOSITORY."
View
@@ -565,7 +565,10 @@ def unshell(repo, script, localpath, cmd)
fullpath = File.expand_path(localpath)
Dir.chdir(tmpdir) do
cmd = [*cmd, fullpath]
- raise "couldn't run #{cmd.join(' ')}: #{$?}" unless system(*cmd)
+ # unzip returns a 1 exit code for success with warnings
+ unless system(*cmd) || (cmd[0] == '/usr/bin/unzip' && $?.exitstatus == 1)
+ raise "couldn't run #{cmd.join(' ')}: #{$?}"
+ end
end
copy_filesystem(repo, script, tmpdir)
end

0 comments on commit 8627a4d

Please sign in to comment.