Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
``` display("foo"); exit(3); display("bar"); ``` with `scannerctl execute script` would result in "foo" and "bar" being printed. This was because all statements were interpreted first, their respective results collected into a `Vec` and `scannerctl` would then iterate over the results and log them. This is clearly not the intended behavior, since it causes all side effects in the builtin functions to run regardless of whether the script exits or not. This commit fixes this bug by iterating over the results that the stream returns and exiting when `NaslValue::Exit` is encountered, causing any subsequent statements not to run.
- Loading branch information