Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"nanoc check" exception when some issues do not have a subject #804

Closed
Fjan opened this issue Jan 19, 2016 · 1 comment
Closed

"nanoc check" exception when some issues do not have a subject #804

Fjan opened this issue Jan 19, 2016 · 1 comment
Milestone

Comments

@Fjan
Copy link
Contributor

@Fjan Fjan commented Jan 19, 2016

If a "nanoc check" results in multiple issues, and some issues have a subject and others do not, then the command will fail with a "ArgumentError: comparison of String with nil failed".

The add_issue(desc,subject:nil)method takes and optional subject that will become nil if not filled out. When the subject is used on some issues but not others an exception can occur because the command runner tries to sort the issues by subject and will fail when trying to compare nil with a string.

A simple solution would be to make issues without a subject default to an empty string, or to a string such as "(no subject)" here. Alternatively, the sort method in the runner can be changed to account for this.

@ddfreyne
Copy link
Member

@ddfreyne ddfreyne commented Jan 30, 2016

Fixed in #811.

@ddfreyne ddfreyne closed this Jan 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants