Cleanup logic to force an output type

bug/bundler_fix
Chris Doughty 2015-12-29 15:11:16 -06:00
parent 29ea553e03
commit 3f98511d7c
1 changed files with 8 additions and 4 deletions

View File

@ -761,8 +761,11 @@ class Core
if (args.length == 0)
if (active_module)
print(Serializer::Json.dump_module(active_module)) if dump_json
print(Serializer::ReadableText.dump_module(active_module)) if dump_json
if dump_json
print(Serializer::Json.dump_module(active_module))
else
print(Serializer::ReadableText.dump_module(active_module))
end
return true
else
cmd_info_help
@ -778,9 +781,10 @@ class Core
if (mod == nil)
print_error("Invalid module: #{name}")
elsif dump_json
print(Serializer::Json.dump_module(mod))
else
print(Serializer::Json.dump_module(mod)) if dump_json
print(Serializer::ReadableText.dump_module(mod)) if dump_json
print(Serializer::ReadableText.dump_module(mod))
end
}
end