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

Commit aed2019

Browse files
Restoring error dialog messages
1 parent cf50913 commit aed2019

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/UnityExtension/Assets/Editor/GitHub.Unity/UI/ProjectWindowInterface.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,16 @@ private static void ContextMenu_Lock()
126126

127127
taskQueue.FinallyInUI((success, exception) =>
128128
{
129+
if (!success)
130+
{
131+
var error = exception.Message;
132+
if (error.Contains("exit status 255"))
133+
error = "Failed to lock: no permissions";
134+
EditorUtility.DisplayDialog(Localization.RequestLockActionTitle,
135+
error,
136+
Localization.Ok);
137+
}
138+
129139
isBusy = false;
130140
Selection.activeGameObject = null;
131141
}).Start();
@@ -184,6 +194,16 @@ private static void ContextMenu_Unlock()
184194

185195
taskQueue.FinallyInUI((success, exception) =>
186196
{
197+
if (!success)
198+
{
199+
var error = exception.Message;
200+
if (error.Contains("exit status 255"))
201+
error = "Failed to unlock: no permissions";
202+
EditorUtility.DisplayDialog(Localization.RequestLockActionTitle,
203+
error,
204+
Localization.Ok);
205+
}
206+
187207
isBusy = false;
188208
Selection.activeGameObject = null;
189209
}).Start();

0 commit comments

Comments
 (0)