File tree Expand file tree Collapse file tree 4 files changed +5
-4
lines changed Expand file tree Collapse file tree 4 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -34,10 +34,10 @@ module Github : Api.Github = struct
34
34
try
35
35
response.content |> String. split_lines |> String. concat |> decode_string_pad |> Config_j. config_of_string
36
36
|> fun res -> Lwt. return @@ Ok res
37
- with Base64. Invalid_char as exn ->
37
+ with exn ->
38
38
let e = Exn. to_string exn in
39
39
Lwt. return
40
- @@ fmt_error " error while decoding base64 in GitHub response: %s\n failed to get config from file %s" e url
40
+ @@ fmt_error " error while reading config from GitHub response: %s\n failed to get config from file %s" e url
41
41
end
42
42
| encoding ->
43
43
Lwt. return
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ let first_line s =
23
23
| [] -> s
24
24
25
25
let decode_string_pad s =
26
- String. rstrip ~drop: (List. mem [ '=' ; ' ' ; '\n' ; '\r' ; '\t' ] ~equal: Char. equal) s |> Base64. decode_string
26
+ String. rstrip ~drop: (List. mem [ '=' ; ' ' ; '\n' ; '\r' ; '\t' ] ~equal: Char. equal) s |> Base64. decode_exn ~pad: false
27
27
28
28
let http_request ?headers ?body meth path =
29
29
match % lwt Web. http_request_lwt ~ua: " monorobot" ~verbose: true ?headers ?body meth path with
Original file line number Diff line number Diff line change 1
1
(library
2
2
(name lib)
3
- (libraries atdgen atdgen-runtime base base.caml biniou cstruct curl curl.lwt
3
+ (libraries atdgen atdgen-runtime base base64 base.caml biniou cstruct curl curl.lwt
4
4
devkit devkit.core extlib hex lwt lwt.unix nocrypto omd re stdio uri
5
5
yojson)
6
6
(preprocess
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ depends: [
13
13
"dune" {>= "2.5.0"}
14
14
"atdgen"
15
15
"base"
16
+ "base64"
16
17
"biniou"
17
18
"cmdliner"
18
19
"cstruct"
You can’t perform that action at this time.
0 commit comments