nushell / nushell.github.io

Nushell's main website, blog, book, and more
https://www.nushell.sh/book/
MIT License
183 stars 434 forks source link

wrapped script in "def main [] {...}" #1599

Closed amkhlv closed 3 weeks ago

amkhlv commented 3 weeks ago

The example was not running correctly, without main [] It resulted in the following error:

 1 │ ╭─▶ #!/usr/bin/env -S nu --stdin
 2 │ │   
 3 │ │   echo $"stdin: ($in)"
 4 │ │     
 5 │ ├─▶ 
   · ╰──── block is missing compiled representation
132ikl commented 3 weeks ago

oh my, good catch!

fdncred commented 3 weeks ago

Thanks