11app [Model , program] {
22 pf: platform " ../platform/main.roc" ,
3- http: " https://github.com/roc-lang/http/releases/download/0.1/6LcdNq2r7xTBwj972ecYWUkMWobJr94yL2NyJpHRAXap .tar.zst" ,
3+ http: " https://github.com/roc-lang/http/releases/download/1.0.0/6ZUwqYhCS8PU9Mo6MF7oV82ET2o7KYb57CLKDq4cq4sS .tar.zst" ,
44}
55
66import pf.Http
@@ -28,13 +28,13 @@ init! = || {
2828 . args ([" Hi" ])
2929 . exec_output !()?
3030
31- _ = Stdout . line !("${Str . inspect (cmd_output )}")
31+ Stdout . line !("${Str . inspect (cmd_output )}")?
3232
3333 # To run a command with environment variables.
3434 Cmd . new ("env ")
3535 . clear_envs () # You probably don't need to clear all other environment variables, this is just an example.
3636 . env (" FOO" , " BAR" )
37- . envs ([( " BAZ" , " DUCK" ), ( " XYZ" , " ABC" ) ]) # Set multiple environment variables at once with `envs`
37+ . envs ([{ name: " BAZ" , value: " DUCK" }, { name: " XYZ" , value: " ABC" } ]) # Set multiple environment variables at once with `envs`
3838 . args ([" -v" ])
3939 . exec_cmd !()?
4040
@@ -45,7 +45,7 @@ init! = || {
4545 . args ([" non_existent.txt" ])
4646 . exec_exit_code !()?
4747
48- _ = Stdout . line !("Exit code: ${exit_code. to_str ()}" )
48+ Stdout . line !("Exit code: ${exit_code. to_str ()}" )?
4949
5050 # To execute and capture the output (stdout and stderr) in the original form as bytes without inheriting your terminal.
5151 # Prefer using `exec_output!`.
@@ -54,15 +54,15 @@ init! = || {
5454 .args([" Hi " ])
5555 .exec_output_bytes!()?
5656
57- _ = Stdout.line!(" ${Str . inspect (cmd_output_bytes )}")
57+ Stdout.line!(" ${Str . inspect (cmd_output_bytes )}")?
5858
5959 Ok ({})
6060 }
6161
6262 match result() {
6363 Ok (_ ) => Ok ({})
6464 Err (err) => {
65- _ = Stderr . line !("Error running commands: ${Str . inspect (err )}")
65+ Stderr . line !("Error running commands: ${Str . inspect (err )}") ?? {}
6666 Err (Exit (1 ))
6767 }
6868 }
0 commit comments