libraries[json2][download][type] = get
libraries[json2][download][url] = https://raw.github.com/douglascrockford/JSON-js/master/json2.js
Results in:
Executing: curl --fail -s -L --connect-timeout 30 -o /private/tmp/download_fileo2bzvV https://raw.github.com/douglascrockford/JSON-js/master/json2.js
Calling is_readable(/private/tmp/download_fileo2bzvV) [93.26 sec, 7.19 MB] [debug]
Calling is_writable(/tmp/make_tmp_1351513068_508e73ecd928b) [93.26 sec, 7.19 MB] [debug]
Calling rename(/private/tmp/download_fileo2bzvV, /tmp/make_tmp_1351513068_508e73ecd928b/json2.js) [93.26 sec, 7.19 MB] [debug]
json2 downloaded from https://raw.github.com/douglascrockford/JSON-js/master/json2.js. [93.26 sec, 7.18 MB] [ok]
No fileinfo or mime_magic support available. [93.26 sec, 7.19 MB] [debug]
Examining /tmp/make_tmp_1351513068_508e73ecd928b/json2.js headers. [93.26 sec, 7.19 MB] [debug]
Unable to determine mime type from header bytes 0x2a2f of /tmp/make_tmp_1351513068_508e73ecd928b/json2.js. [93.26 sec, [notice]
7.19 MB]
Examining /tmp/make_tmp_1351513068_508e73ecd928b/json2.js extension. [93.26 sec, 7.19 MB] [debug]
Mime type for json2.js is application/x-tar [93.26 sec, 7.19 MB] [notice]
No fileinfo or mime_magic support available. [93.26 sec, 7.19 MB] [debug]
Examining /tmp/make_tmp_1351513068_508e73ecd928b/json2.js headers. [93.26 sec, 7.19 MB] [debug]
Unable to determine mime type from header bytes 0x2a2f of /tmp/make_tmp_1351513068_508e73ecd928b/json2.js. [93.27 sec, [notice]
7.2 MB]
Examining /tmp/make_tmp_1351513068_508e73ecd928b/json2.js extension. [93.27 sec, 7.2 MB] [debug]
Mime type for json2.js is application/x-tar [93.27 sec, 7.2 MB] [notice]
Calling chdir(/tmp/make_tmp_1351513068_508e73ecd928b) [93.27 sec, 7.2 MB] [debug]
Executing: tar -C /tmp/drush_tmp_1351513161_508e7449bb50a -xf json2.js
tar: Unrecognized archive format
tar: Error exit delayed from previous errors.
Calling chdir(/my/build/dir) [93.31 sec, 7.2 MB] [debug]
Unable to untar /tmp/make_tmp_1351513068_508e73ecd928b/json2.js. [93.31 sec, 7.2 MB] [error]
on a mac with php 5.3.15
Comment | File | Size | Author |
---|---|---|---|
#6 | drush-1825946.patch | 539 bytes | jonhattan |
Comments
Comment #1
jhedstromWhen I visit https://raw.github.com/douglascrockford/JSON-js/master/json2.js I get a 403 error.
Comment #2
joelcollinsdc CreditAttribution: joelcollinsdc commentedI believe that is due to github preventing people from hotlinking it.
Try curl -v https://raw.github.com/douglascrockford/JSON-js/master/json2.js
Comment #3
jhedstromOk, that makes sense. Will try to look into this.
Comment #4
jhedstromHmm, I'm unable to reproduce this:
foo.make:
Comment #5
jhedstromMoving back to active for others to chime in. I'm running php 5.4.6 on ubuntu 12.10, so there may be others that can reproduce this. Looking at the initial report, for whatever reason, the js file is being seen as a tar archive, and that logic happens here: http://drupalcode.org/project/drush.git/blob/refs/heads/7.x-5.x:/include.... The mime type detection is highly dependent on local environment, and which packages are enabled for PHP, etc.
Comment #6
jonhattanThere's a bug in the logic that causes the file to be considered .tar
Other than that, it seems the OP has a poor php:
Committed attached patch.
Comment #7
jonhattan- duplicate -
Comment #8
jonhattanComment #9
jonhattanNot much more to say here. Once the bug is corrected drush should work even without fileinfo.
@joelcollinsdc check that you have fileinfo enabled in your php.ini file: