exe/dockerun in dockerun-0.4.0 vs exe/dockerun in dockerun-0.4.1
- old
+ new
@@ -1,14 +1,21 @@
#!/usr/bin/env ruby
require_relative '../lib/dockerun'
+require 'colorize'
+
# Operations
# 1. [i]nit - Copy sample spec into project dir
# 2. [r]un - Run the spec (default without params)
# 3. [d]elete [c]ontainer - Delete container (using image name inside spec)
# 4. [d]elete [i]mage - Delete image (Using container name inside spec)
# 5. reset - Delete container and image
cli = Dockerun::CliEngine.new
-cli.parse_argv(ARGV)
+begin
+ cli.parse_argv(ARGV)
+rescue TR::ArgUtils::RequiredFieldEmpty => ex
+ STDERR.puts "\n Operation requires parameter. Error was : #{ex.message}".red
+ puts cli.parse_argv(["help"])
+end