test: curl --fail; use KUDOs

This commit is contained in:
swrup 2026-02-21 23:40:58 +01:00 committed by Swrup
parent 7bb2f60f24
commit 05f4b39a7b
6 changed files with 34 additions and 24 deletions

View file

@ -41,7 +41,15 @@ let download ~tmp ~url =
let res =
OS.Cmd.run
Cmd.(
v "curl" % "--silent" % "--show-error" % "-o" % tmp % "-X" % "GET" % url)
v "curl"
% "--silent"
% "--show-error"
% "--fail"
% "-o"
% tmp
% "-X"
% "GET"
% url)
in
match res with
| Error (`Msg s) -> Fmt.failwith "download failure: %s" s

View file

@ -158,6 +158,7 @@ let download ~output ~url =
v "curl"
% "--silent"
% "--show-error"
% "--fail"
% "-o"
% output
% "-X"
@ -171,6 +172,8 @@ let upload ~input ~url =
Cmd.(
v "curl"
% "--silent"
% "--show-error"
% "--fail"
% "-i"
% "-X"
% "POST"