@@ -125,7 +125,7 @@ def create_config_init_app_from_remote_template(app_name: str, template_url: str
125125 temp_dir = tempfile .mkdtemp ()
126126 except OSError as ose :
127127 console .error (f"Failed to create temp directory for download: { ose } " )
128- raise SystemExit (1 ) from ose
128+ raise SystemExit (1 ) from None
129129
130130 # Use httpx GET with redirects to download the zip file.
131131 zip_file_path : Path = Path (temp_dir ) / "template.zip"
@@ -136,28 +136,28 @@ def create_config_init_app_from_remote_template(app_name: str, template_url: str
136136 response .raise_for_status ()
137137 except httpx .HTTPError as he :
138138 console .error (f"Failed to download the template: { he } " )
139- raise SystemExit (1 ) from he
139+ raise SystemExit (1 ) from None
140140 try :
141141 zip_file_path .write_bytes (response .content )
142142 console .debug (f"Downloaded the zip to { zip_file_path } " )
143143 except OSError as ose :
144144 console .error (f"Unable to write the downloaded zip to disk { ose } " )
145- raise SystemExit (1 ) from ose
145+ raise SystemExit (1 ) from None
146146
147147 # Create a temp directory for the zip extraction.
148148 try :
149149 unzip_dir = Path (tempfile .mkdtemp ())
150150 except OSError as ose :
151151 console .error (f"Failed to create temp directory for extracting zip: { ose } " )
152- raise SystemExit (1 ) from ose
152+ raise SystemExit (1 ) from None
153153
154154 try :
155155 zipfile .ZipFile (zip_file_path ).extractall (path = unzip_dir )
156156 # The zip file downloaded from github looks like:
157157 # repo-name-branch/**/*, so we need to remove the top level directory.
158158 except Exception as uze :
159159 console .error (f"Failed to unzip the template: { uze } " )
160- raise SystemExit (1 ) from uze
160+ raise SystemExit (1 ) from None
161161
162162 if len (subdirs := list (unzip_dir .iterdir ())) != 1 :
163163 console .error (f"Expected one directory in the zip, found { subdirs } " )
0 commit comments