The change to include globbing breaks relative paths with recursive includes.
The current directory has to be added in the method include not in the
method include_file otherwise glob.glob does not find anything and
the line will be replaced with an empty array which leads to index out of
bound access later.
Additionally, currently, empty globs create list index out of bounds errors
during execution. This happens because calling include returns an
empty list in that case, therefore removing a line in the file that the
code afterwards assumes still exists.
The change to include globbing breaks relative paths with recursive includes. The current directory has to be added in the method include not in the method include_file otherwise glob.glob does not find anything and the line will be replaced with an empty array which leads to index out of bound access later.
Additionally, currently, empty globs create list index out of bounds errors during execution. This happens because calling include returns an empty list in that case, therefore removing a line in the file that the code afterwards assumes still exists.