Skip to content

Conversation

Priya5
Copy link

@Priya5 Priya5 commented Jan 16, 2017

No description provided.

@rapbhan
Copy link

rapbhan commented Jan 16, 2017

LGTM

@rapbhan rapbhan merged commit 481d96d into master Jan 16, 2017
@rapbhan rapbhan deleted the OTWO-4588 branch January 16, 2017 10:48
@PDegenPortnoy
Copy link

Why was this the correction? What was the root cause that this addresses?

@Priya5
Copy link
Author

Priya5 commented Jan 16, 2017

For svn repository which does not have tags,

tag_strings = `svn ls -v #{ base_path}/tags`.split(/\n/)
will return empty array.
Running [ ][1..-1] on it will return nil, which causes the issue. So, I have used [ ].drop(1), which will return [ ].

@PDegenPortnoy
Copy link

For posterity, the end[1..-1] code returns the rest of the array by skipping the first element. However, for an empty array, this returns nil, which causes problems downstream. The method needs to return an array. Changing that line to end.drop(1) will return the rest of the array by dropping the first element, but will always return an array even if the array was empty to start iwth.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants