tynanbe / shellout

🐢 A Gleam library for cross-platform shell operations
Apache License 2.0
46 stars 1 forks source link

Escaped compiler error #3

Closed bcpeinhardt closed 7 months ago

bcpeinhardt commented 8 months ago

Hello!

I was trying to use shellout to run a simple script

shellout.arguments()
  |> shellout.command(run: "test.sh", in: "./tmp/permissions", opt: [])
  |> result.map(with: fn(output) {
    io.print(output)
    0
  }) |> result.map_err(with: fn(error) {
    io.print(error)
    1
  })

but I'm getting this error from inside shellout

error: Syntax error
    ┌─ /Users/benjaminpeinhardt/Development/Projects/simplifile/build/packages/shellout/src/shellout.gleam:215:19
    │
215 │   string.concat(["\e[", code, "m", string, "\e[0m\e[K"])
    │                   ^ I don't understand this escape code

Hint: Add another backslash before it.
See: https://gleam.run/book/tour/strings.html#escape-sequences
tynanbe commented 8 months ago

You'll likely need to gleam clean and/or update to shellout v1.5

tynanbe commented 7 months ago

This should be resolved.