From afaee880508738e5bf08a13a59174e7ff4a1d1bf Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Mon, 30 Sep 2024 17:14:10 +0100 Subject: [PATCH] Update customize.py | Fix download-file on windows when downloaded file already exists --- script/download-file/customize.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/download-file/customize.py b/script/download-file/customize.py index 97969418c..6e7aa0786 100644 --- a/script/download-file/customize.py +++ b/script/download-file/customize.py @@ -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%"