[FIX] script format support space into files
This commit is contained in:
parent
dce3f98bbc
commit
f1f4769a21
1 changed files with 11 additions and 0 deletions
|
|
@ -31,6 +31,14 @@ def get_modified_files():
|
||||||
continue
|
continue
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
has_space = False
|
||||||
|
file_path_space = ""
|
||||||
|
if '"' in line:
|
||||||
|
has_space = True
|
||||||
|
file_path_space = line[
|
||||||
|
line.index('"') + 1 : line.rindex('"')
|
||||||
|
]
|
||||||
|
line = line.replace(f'"{file_path_space}"', "replace")
|
||||||
if "->" in line:
|
if "->" in line:
|
||||||
# Example : M file_01 -> file_02
|
# Example : M file_01 -> file_02
|
||||||
status, old_file_path, code, file_path = (
|
status, old_file_path, code, file_path = (
|
||||||
|
|
@ -41,6 +49,9 @@ def get_modified_files():
|
||||||
status, file_path = (
|
status, file_path = (
|
||||||
line.strip().replace(" ", " ").split(" ")
|
line.strip().replace(" ", " ").split(" ")
|
||||||
)
|
)
|
||||||
|
if has_space:
|
||||||
|
file_path = file_path_space
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"'{line}'")
|
print(f"'{line}'")
|
||||||
raise e
|
raise e
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue