Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.

Commit dc2a74c

Browse files
committed
Download releases.csv first and abort setup on failure
1 parent ac5dc7c commit dc2a74c

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

ElixirWeb.iss

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,6 @@ end;
153153
procedure CurPageChanged(CurPageID: Integer);
154154
begin
155155
if CurPageID = PSelInstallType.ID then begin
156-
if not FileExists(ExpandConstant('{tmp}\releases.csv')) then begin
157-
idpDownloadFile('http://elixir-lang.org/releases.csv', ExpandConstant('{tmp}\releases.csv'));
158-
end;
159156
PopulatePSelReleaseListBox(CSVToStringTable(ExpandConstant('{tmp}\releases.csv')));
160157
end;
161158
@@ -188,3 +185,13 @@ begin
188185
PSelReleaseListBox.Height := PSelRelease.SurfaceHeight - 10;
189186
PSelReleaseListBox.Parent := PSelRelease.Surface;
190187
end;
188+
189+
function InitializeSetup(): Boolean;
190+
begin
191+
if not idpDownloadFile('http://elixir-lang.org/releases.csv', ExpandConstant('{tmp}\releases.csv')) then begin
192+
MsgBox('Error: Downloading http://elixir-lang.org/releases.csv failed. Setup cannot continue.', mbInformation, MB_OK);
193+
Result := False;
194+
end else begin
195+
Result := True;
196+
end;
197+
end;

0 commit comments

Comments
 (0)