mirror of
https://github.com/nushell/nushell.git
synced 2024-12-15 19:52:26 +01:00
Improve running main (#431)
This commit is contained in:
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(());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user