ileitch-hijack 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/bin/hijack +7 -1
  2. metadata +1 -1
data/bin/hijack CHANGED
@@ -4,11 +4,17 @@ $:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
4
4
  require 'hijack'
5
5
 
6
6
  options = {}
7
+ usage = 'Usage: hijack [options] <PID>'
7
8
  ARGV.clone.options do |opts|
8
- opts.banner = 'Usage: hijack [options] <PID>'
9
+ opts.banner = usage
9
10
  opts.on("--gdb-debug", "Print gdb activity to the console.") { |v| options[:gdb_debug] = v }
10
11
  opts.on("-h", "--help", "Show this help message.") { puts opts; exit }
11
12
  opts.parse!
12
13
  end
13
14
 
15
+ if ARGV.last.nil?
16
+ puts usage
17
+ exit 1
18
+ end
19
+
14
20
  Hijack.start(ARGV.last, options)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ileitch-hijack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ian Leitch