View Single Post
Old 2021-10-04, 16:25   #11
kruoli
 
kruoli's Avatar
 
"Oliver"
Sep 2017
Porta Westfalica, DE

3·73 Posts
Default

Have a look at line 855 of driver.c, it says if (isatty(fileno(stdin)) == 0) (in my current GIT checkout), and this is the only point where is_cmdline_run gets set to 2 and 2 is the only value which leads to yafu_obj.USEBATCHFILE being set to 2 (also the only occurence), the other possible value for yafu_obj.USEBATCHFILE would be 1, but we can assume that it is not 1, because you have not set the batchfile option. So we enter the if in line 230, which is the only place where prepare_batchfile gets called, and this is the only place where the message "no variable indicator (@) ..." gets printed.

If I am correct here, it will follow that isatty(fileno(stdin)) is something != 0 (likely 1) when executing directly for you and 0 when executing in your script. I checked that with my Debian WSL and could not reproduce that. Are you piping something into the script? Or are you accessing stdin at any place in the script?
kruoli is offline   Reply With Quote