Skip to content

Commit

Permalink
Accept nil if RBS_PROTOBUF_ACCEPT_NIL_ATTR_WRITER env var exists
Browse files Browse the repository at this point in the history
  • Loading branch information
soutaro committed Apr 25, 2022
1 parent 71cf127 commit 0705bae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion exe/protoc-gen-rbs
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@ translator = case backend
true
end

accept_nil_writer = ENV.key?("RBS_PROTOBUF_ACCEPT_NIL_ATTR_WRITER")

RBSProtobuf::Translator::ProtobufGem.new(
input,
upcase_enum: upcase_enum,
nested_namespace: !no_nested_namespace,
extension: extension,
accept_nil_writer: false
accept_nil_writer: accept_nil_writer
)
when "google-protobuf"
raise NotImplementedError
Expand Down

0 comments on commit 0705bae

Please sign in to comment.