Skip to content

Commit

Permalink
Update customize.py | Fix download-file on windows when downloaded fi…
Browse files Browse the repository at this point in the history
…le already exists
  • Loading branch information
arjunsuresh authored Sep 30, 2024
1 parent 28b817e commit afaee88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion script/download-file/customize.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def preprocess(i):
if not pre_clean:
env['CM_PRE_DOWNLOAD_CMD'] = ''

if os_info['platform'] == 'windows':
if os_info['platform'] == 'windows' and env.get('CM_DOWNLOAD_CMD, '') != '':
env['CM_DOWNLOAD_CMD'] = env['CM_DOWNLOAD_CMD'].replace('&', '^&').replace('|', '^|').replace('(', '^(').replace(')', '^)')
if pre_clean:
env['CM_PRE_DOWNLOAD_CLEAN_CMD'] = "del /Q %CM_DOWNLOAD_FILENAME%"
Expand Down

0 comments on commit afaee88

Please sign in to comment.