Reproduction for: https://gitlab.kitware.com/cmake/cmake/-/issues/23328
To reproduce:
docker build .
Which should give:
#10 0.549 -- Detecting CXX compile features - done
#10 0.551 terminate called after throwing an instance of 'std::out_of_range'
#10 0.551 what(): basic_string::erase: __pos (which is 1545) > this->size() (which is 18)
#10 0.552 /bin/sh: line 1: 10 Aborted $HOME/CMake/build/bin/cmake ../
------
executor failed running [/bin/sh -c mv repro.cmake CMakeLists.txt && ls && mkdir test-build && cd test-build && $HOME/CMake/build/bin/cmake ../]: exit code: 134