Skip to content

Commit fa23695

Browse files
committed
Add helpers.cr
1 parent 6d80b99 commit fa23695

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Diff for: src/kommando/helpers.cr

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
module Kommando::Helpers
2+
def run!(*args : String | Path, **options)
3+
r = Process.run(
4+
args.first.to_s, args.skip(1).map(&.to_s),
5+
output: STDOUT,
6+
error: STDOUT
7+
)
8+
9+
raise "Command failed" if !r.success?
10+
11+
r
12+
end
13+
end

0 commit comments

Comments
 (0)