Improve running main (#431)

This commit is contained in:
JT 2021-12-05 07:02:53 +13:00 committed by GitHub
parent c6aff972da
commit ddd8c3d9dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -162,7 +162,7 @@ fn main() -> Result<()> {
// Next, let's check if there are any flags we want to pass to the main function
let args: Vec<String> = std::env::args().skip(2).collect();
if args.is_empty() {
if args.is_empty() && engine_state.find_decl(b"main").is_none() {
return Ok(());
}