mirror of
https://github.com/nushell/nushell.git
synced 2025-03-30 10:37:29 +02: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
|
// 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();
|
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(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user