Commit 6b77997
fix(ci): do not crash if file in repo root is modified
by unconditionally grabbing the second part of the path of a modified
file in `run_all_tests()`, we ended up indexing out of bounds if a
modified file does not _have_ a second component in its path (e.g. if
the file is at the repository root, like `Cargo.lock`). Fix this by
checking for the length of x.parts first, and using python's
short-circuiting behavior of logical operators.
Signed-off-by: Patrick Roy <roypat@amazon.co.uk>1 parent 0649347 commit 6b77997
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| |||
0 commit comments