Commit 25142fc3 authored by Víctor Manuel Jáquez Leal's avatar Víctor Manuel Jáquez Leal Committed by Sebastian Dröge change heuristic to modify Cargo.toml

It is easy to forget to add the final comma in the last item in
the workspace member list, thus the current heuristic breaks the
Cargo.toml parsing.

Instead of trying to append the gir item, it is inserted at
position end-2, avoiding the previous described situation.
parent d9078774
......@@ -12,7 +12,7 @@ def update_workspace():
old_lines = f.readlines()
lines = old_lines[:]
with open('Cargo.toml', 'w') as f:
lines.insert(len(lines) - 1, '"gir",')
lines.insert(len(lines) - 2, '"gir",')
success = True
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment