mirror of
https://github.com/modelscope/modelscope.git
synced 2026-02-24 12:10:09 +01:00
[to #47947101]fix: fix diff based case not process deleted file
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/11729541
This commit is contained in:
@@ -129,7 +129,13 @@ def get_modified_files():
|
||||
cmd_output = run_command_get_output(cmd)
|
||||
logger.info('Modified files: ')
|
||||
logger.info(cmd_output)
|
||||
return cmd_output.splitlines()
|
||||
modified_files = []
|
||||
# remove the deleted file.
|
||||
for diff_file in cmd_output.splitlines():
|
||||
if os.path.exists(diff_file):
|
||||
modified_files.append(diff_file)
|
||||
|
||||
return modified_files
|
||||
|
||||
|
||||
def analysis_diff():
|
||||
|
||||
Reference in New Issue
Block a user