diff options
| author | mo khan <mo.khan@gmail.com> | 2019-12-27 16:19:02 -0700 |
|---|---|---|
| committer | mo khan <mo.khan@gmail.com> | 2019-12-27 16:19:02 -0700 |
| commit | 2d87d15728e45f7a7dc4ab4f2bab6881712644eb (patch) | |
| tree | deb4d4d126aec16cdee677dacb42bd0b1c55a344 /exe | |
| parent | 6e9f360f9afeb070d09b9c838423a81a50e05061 (diff) | |
Install tty
Diffstat (limited to 'exe')
| -rwxr-xr-x | exe/spandx | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -1,4 +1,18 @@ #!/usr/bin/env ruby # frozen_string_literal: true -require 'spandx' +lib_path = File.expand_path('../lib', __dir__) +$LOAD_PATH.unshift(lib_path) unless $LOAD_PATH.include?(lib_path) +require 'spandx/cli' + +Signal.trap('INT') do + warn("\n#{caller.join("\n")}: interrupted") + exit(1) +end + +begin + Spandx::CLI.start +rescue Spandx::CLI::Error => error + puts "ERROR: #{error.message}" + exit 1 +end |
