mirror of
https://github.com/danbulant/nushell
synced 2026-05-24 12:35:59 +00:00
Improve running main (#431)
This commit is contained in:
parent
c6aff972da
commit
ddd8c3d9dc
1 changed files with 1 additions and 1 deletions
|
|
@ -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 a new issue