1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

v: run code from stdin echo println(2+2) | v run -, with no repl limits (#6884)

This commit is contained in:
Nicolas Sauzede
2020-11-20 09:25:59 +01:00
committed by GitHub
parent 55a7c907ad
commit 159932d59b
3 changed files with 72 additions and 1 deletions

View File

@@ -1,8 +1,11 @@
Usage: v [build flags] run <file.v|directory> [arguments...]
Usage: v [build flags] run <file.v|directory|-> [arguments...]
This command is equivalent to running `v build` and running the compiled executable.
The executable is passed the arguments as provided in [arguments...].
If the target is '-', it means that the V source code to build comes from stdin.
If the '-o' option is not specified, and the target is '-', a temporary base name for the executable will be used.
The exit status of run will be:
* `1` if the compilation failed.
* The exit code of the compiled executable otherwise.