1
0
mirror of https://github.com/nushell/nushell.git synced 2025-07-15 22:05:51 +02:00

Improve running main ()

This commit is contained in:
JT
2021-12-05 07:02:53 +13:00
committed by GitHub
parent c6aff972da
commit ddd8c3d9dc

@ -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(());
}