Skip to content

Commit be8fabe

Browse files
committed
Adding try catch to handle id the src, dist, node_modules dirs are missing.
1 parent 6f73e0e commit be8fabe

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

eFormAPI/Installation/CustomActions/CustomAction.cs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,18 @@ public static ActionResult UpdateCA(Session session)
317317
RunProcess(@"C:\Program Files\nodejs\node.exe", "svc.js uninstall", uiIisDir);
318318
IncrementProgressBar(session);
319319

320-
DeleteDirectory(Path.Combine(uiIisDir, "node_modules"));
321-
DeleteDirectory(Path.Combine(uiIisDir, "dist"));
320+
try
321+
{
322+
DeleteDirectory(Path.Combine(uiIisDir, "node_modules"));
323+
} catch { }
324+
try
325+
{
326+
DeleteDirectory(Path.Combine(uiIisDir, "dist"));
327+
} catch { }
328+
try
329+
{
330+
DeleteDirectory(Path.Combine(uiIisDir, "src"));
331+
} catch { }
322332

323333
session.Log("Set proper names to folders");
324334

0 commit comments

Comments
 (0)