Skip to content

Commit 52de3c6

Browse files
guard legacy for monodevelop dir cleanup
1 parent de402c8 commit 52de3c6

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

src/unity-editor.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -336,11 +336,14 @@ export class UnityEditor {
336336
'-Command',
337337
`Start-Process -FilePath "${uninstallPath}" -ArgumentList "/S" -Wait`
338338
], { silent: true, showCommand: true });
339-
// also delete the editor root directory if it still exists
339+
// delete the editor root directory if it still exists
340340
await DeleteDirectory(editorDir);
341-
// also delete the MonoDevelop directory one level up if it still exists
342-
const monoDevelopDir = path.join(path.dirname(editorDir), 'MonoDevelop');
343-
await DeleteDirectory(monoDevelopDir);
341+
342+
if (this.version.isLegacy()) {
343+
// delete the MonoDevelop that is a sibling of the Unity editor directory
344+
const monoDevelopDir = path.join(path.dirname(editorDir), 'MonoDevelop');
345+
await DeleteDirectory(monoDevelopDir);
346+
}
344347
break;
345348
}
346349
}

0 commit comments

Comments
 (0)