is there a way to configure #lualatex to abort on non-existent input file (instead of dumping me in this annoying shell that is annoying to leave?)

#latex

@blitter Yes. But how it works depends a bit on how you try to include it.

e.g. there is
\InputIfFileExists {⟨file-name⟩} {⟨true⟩} {⟨false⟩}

And if you talk about the shell, there it's also possble to switch to the nonstopmode in case you don't want to interact.

But … be aware that this might have weird side effects, simply because one of the missing files might be able to impact the rest of the document.

@TeXhackse I think you missunderstand my question.

When invoking lualatex myfile.tex from the command line, I sometimes happen to be in the wrong directory, and therefore the command fails. But rather than dropping me back into the shell (which I would like to happen) I end up in the shell asking me for the name of an existing latex file.

@blitter Ah, yes I did.

Then the batchmode would be what you want.
This would stop automatically on the first error.

so `lualatex --interaction=batchmode myfile.tex`

To enable it by default you build your own lualatex.fmt which adds \batchmode to the format file … Maybe there is another option as well, would consider checking the luatex documentation.