drupal - Drush make - 解压缩和区分 mime 时间时出错

标签 drupal drush

我已在 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/

相关文章:

drupal - 如何将docker与drupal和drush一起使用?

php - 为什么将 docker-compose exec 的输出管道输出到 grep,会破坏它?

php - 在 PHP 中嵌套 SQL 查询

php - Drupal 电子邮件变量未出现

html - CSS 错误,MouseOver 链接在 IE 中移动文本

jquery - 无法获取附加 anchor 上的点击事件

php - Drush 站点安装 dkan 失败 - "All parts of a PRIMARY KEY must be NOT NULL"

php - 在 Drupal 中向 OnLoad 添加函数

drupal - 使用 drush php-script 启动的脚本在 ctrl+c 后不会退出

osx-yosemite - Yosemite 更新后出现 Drush 错误