Proper exit status for script/licensed

This commit is contained in:
Brandon Keepers
2016-04-16 10:25:34 -04:00
parent 92897046ed
commit 12228fb525

View File

@@ -36,8 +36,11 @@ source = Licensed::Source::Filesystem.new("vendor/grammars/*/", type: "grammar")
config = Licensed::Configuration.new
config.sources << source
if ARGV[0] == "verify"
Licensed::Command::Verify.new(config).run
command = if ARGV[0] == "verify"
Licensed::Command::Verify.new(config)
else
Licensed::Command::Cache.new(config).run(force: true)
Licensed::Command::Cache.new(config)
end
command.run
exit command.success?