forked from mirrors/gstreamer-rs
generator.py: 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.
This commit is contained in:
parent
d9078774c3
commit
25142fc3b5
1 changed files with 1 additions and 1 deletions
|
@ -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",')
|
||||
f.write(''.join(lines))
|
||||
success = True
|
||||
try:
|
||||
|
|
Loading…
Reference in a new issue