我已在 Windows 2008 R2 Enterprise 上安装了 Drush 5.8,其中包含除远程管理之外的所有选项。
每当我运行 drush make
时,我都会收到错误,无法解压缩 github 存档文件,并且无法确定 js 文件的 mime 类型。这是我的 make 文件和输出。我不确定这里出了什么问题,并且希望您能提供任何指点。
制作文件:
; Drupal 7 core
core = 7.x
api = 2
projects[drupal][version] = 7
; Libraries
; --------
libraries[colorbox][download][type] = "get"
libraries[colorbox][download][url] = "https://github.com/jackmoore/colorbox/archive/1.4.8.zip"
libraries[colorbox][directory_name] = colorbox
libraries[colorbox][destination] = libraries
libraries[zepto][download][type] = "get"
libraries[zepto][download][url] = "http://zeptojs.com/zepto.min.js"
libraries[zepto][directory_name] = zepto
libraries[zepto][destination] = libraries
输出:
C:\Users\Administrator\Desktop\drush>drush make test.make testing
Could not locate drupal version 7, will try to download latest recommended or supported release. [warning]
drupal-7.21 downloaded. [ok]
colorbox downloaded from https://github.com/jackmoore/colorbox/archive/1.4.8.zip. [ok]
Unable to unzip C:\Users\ADMINI~1\AppData\Local\Temp\1/make_tmp_1364915473_515af511066a2/1.4.8.zip. [error]
zepto downloaded from http://zeptojs.com/zepto.min.js. [ok]
Unable to determine mime type for zepto.min.js. [error]
最佳答案
经过一番折腾,终于弄清楚了。
使用 Cygwin,我可以获得解压缩的副本,并将其放入 Program Files (x86)\Drush\GnuWin32\bin 目录(位于我的 PATH 环境变量中)。这清除了列出的有关解压缩的错误。
对于 mime 类型问题,我必须手动编辑includes/drush.inc,将 '.js' => 'application/javascript'
添加到 $extension_mimetype 数组中。请参阅http://drupal.org/node/1825946促使我做出这一点的讨论。
关于drupal - Drush make - 解压缩和区分 mime 时间时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15767846/