mirror of
https://github.com/bower/bower.git
synced 2026-04-24 03:00:19 -04:00
Trim refs to prevent empty lines to be in the array.
This commit is contained in:
@@ -71,7 +71,7 @@ GitFsResolver.fetchRefs = function (source) {
|
||||
return cmd('git', ['show-ref', '--tags', '--heads'], { cwd : source })
|
||||
.then(function (stdout) {
|
||||
// Make them an array
|
||||
var refs = stdout.toString().split('\n');
|
||||
var refs = stdout.toString().trim().split('\n');
|
||||
|
||||
this._refs = this._refs || {};
|
||||
return this._refs[source] = refs;
|
||||
|
||||
@@ -42,7 +42,7 @@ GitRemoteResolver.fetchRefs = function (source) {
|
||||
return cmd('git', ['ls-remote', '--tags', '--heads', source])
|
||||
.then(function (stdout) {
|
||||
// Make them an array
|
||||
var refs = stdout.toString().split('\n');
|
||||
var refs = stdout.toString().trim().split('\n');
|
||||
|
||||
this._refs = this._refs || {};
|
||||
return this._refs[source] = refs;
|
||||
|
||||
Reference in New Issue
Block a user