blob: 89dc48f42f0adb180f32afaf90701447e1062234 [file] [log] [blame]
Sebastian Bøec6f367d2018-01-04 17:36:02 +01001import os
2
3
4def crash_if_zephyr_was_cloned_with_wrong_line_endings():
5 f = open('{}/Kconfig'.format(os.environ["ZEPHYR_BASE"]), 'U')
6 f.readline()
7
8 error_msg = "Re-clone with autocrlf false. $ git config --global core.autocrlf false"
9
10 assert f.newlines == '\n', error_msg
11
12def main():
13 crash_if_zephyr_was_cloned_with_wrong_line_endings()
14
15if __name__ == "__main__":
16 main()