git.annexia.org
/
goaljobs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
90eaa31
)
Fix curl return codes.
author
Richard W.M. Jones
<rjones@redhat.com>
Wed, 18 Sep 2013 10:20:52 +0000
(11:20 +0100)
committer
Richard W.M. Jones
<rjones@redhat.com>
Wed, 18 Sep 2013 10:20:52 +0000
(11:20 +0100)
goaljobs.ml
patch
|
blob
|
history
diff --git
a/goaljobs.ml
b/goaljobs.ml
index
b5981ad
..
2dc0541
100644
(file)
--- a/
goaljobs.ml
+++ b/
goaljobs.ml
@@
-187,9
+187,10
@@
let url_exists url =
sprintf "curl --output /dev/null --silent --head --fail %s" (quote url) in
match Sys.command cmd with
| 0 -> true
sprintf "curl --output /dev/null --silent --head --fail %s" (quote url) in
match Sys.command cmd with
| 0 -> true
- | 1 -> false
+ | 1
9|22
-> false
| r ->
| r ->
- let msg = sprintf "curl error testing '%s' (exit code %d)" url r in
+ let msg = sprintf "curl error testing '%s': exit code %d, see curl(1)"
+ url r in
goal_failed msg
let file_contains_string filename str =
goal_failed msg
let file_contains_string filename str =
@@
-208,11
+209,12
@@
let url_contains_string url str =
sprintf "curl --output %s --silent --fail %s" (quote tmp) (quote url) in
(match Sys.command cmd with
| 0 -> ()
sprintf "curl --output %s --silent --fail %s" (quote tmp) (quote url) in
(match Sys.command cmd with
| 0 -> ()
- | 1 ->
+ | 1
9|22
->
let msg = sprintf "curl failed to download URL '%s'" url in
goal_failed msg
| r ->
let msg = sprintf "curl failed to download URL '%s'" url in
goal_failed msg
| r ->
- let msg = sprintf "curl error testing '%s' (exit code %d)" url r in
+ let msg = sprintf "curl error testing '%s': exit code %d, see curl(1)"
+ url r in
goal_failed msg
);
let r = file_contains_string tmp str in
goal_failed msg
);
let r = file_contains_string tmp str in