Skip to content

Commit

Permalink
Add helpers.cr
Browse files Browse the repository at this point in the history
  • Loading branch information
Ragmaanir committed Feb 25, 2024
1 parent 6d80b99 commit fa23695
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/kommando/helpers.cr
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module Kommando::Helpers
def run!(*args : String | Path, **options)
r = Process.run(
args.first.to_s, args.skip(1).map(&.to_s),
output: STDOUT,
error: STDOUT
)

raise "Command failed" if !r.success?

r
end
end

0 comments on commit fa23695

Please sign in to comment.