Yarn: 无法使用git + ssh安装名称中带有#的分支

创建于 2018-06-08  ·  3评论  ·  资料来源: yarnpkg/yarn

您是否要请求功能或报告错误
这是一个错误报告。

目前的行为是什么?
当运行yarn install时, package.json包含使用git+ssh url和
指定名称为#的分支名称(常见于跟踪问题),安装失败,并出现以下错误:

error Couldn't find match for "issue-" in "refs/heads/issue-#1,refs/heads/master" for "[email protected]:cdimitroulas/test-repository.git".

示例package.json依赖项:

"dependencies": {
    "test-module": "git+ssh://[email protected]:cdimitroulas/test-repository.git#issue-#1"
  }

如果当前行为是错误,请提供重现步骤。

  1. 创建一个新的repo并使用npm init -y初始化。
  2. 创建以下package.json
{
  "name": "yarn-bug",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "test-module": "git+ssh://[email protected]:cdimitroulas/test-repository.git#issue-#1"
  }
}
  1. 运行yarn install

预期的行为是什么?
yarn install应该从指定的分支安装我的模块。

请提及您的node.js,yarn和操作系统版本。
npm- 6.1.0
纱线- 1.7.0
操作系统- Ubuntu 16.04 (x64)

cat-bug

所有3条评论

在v1.7.0上确认。 我看看今天是否可以为此进行公关...

辉煌,非常感谢快速公关@ rally25rs :heart_eyes:

发现这是#4880的副本,该副本已经打开了不同的PR#4881进行修复。 由于它与已经存在的问题相同,因此将作为重复项来关闭此问题并关闭我的PR。 #4881中有一些关于我们是否应该完全支持这种语法的讨论...

此页面是否有帮助?
0 / 5 - 0 等级