Sha256: d5381dca66fa70eb342037841cbd898e7698ab26b2c4ff79b7213e845c0c302c
Contents?: true
Size: 529 Bytes
Versions: 1
Compression:
Stored size: 529 Bytes
Contents
#!/usr/bin/env ruby require_relative '../lib/ru' begin args = ARGV command = args.shift stdin = nil # If the command starts with a '!', run it without stdin if command.present? && command.start_with?('! ') command = command[2..-1] # If args is empty, read from stdin elsif args.empty? stdin = STDIN.read end process = Ru::Process.new({ command: command, args: args, stdin: stdin }) puts process.run rescue => e STDERR.puts e.message STDERR.puts e.backtrace.join("\n") exit 1 end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ru-0.0.2 | bin/ru |