brandur/json_schema

Remove check for filename in validate-schema

slhck opened this issue · 0 comments

slhck commented

Per rbenv/rbenv#1178, the validate-schema binary does not work when used as a binstub generated by RubyGems.

The problem has to do with

if $0 == __FILE__
.

The issue is that:

The current script ($0) will not be equal to the current file (__FILE__) because the script would typically be a binstub generated by Rubygems: ~/.rbenv/versions/2.6.3/bin/validate-schema

The script name check therefore makes the script unusable in this case. Since I don't see any obvious benefit from it, I suggest removing the check.