Skip to content

Commit 64f48c0

Browse files
committed
handle all non-zero return statuses from git clone
1 parent 33fa5b8 commit 64f48c0

File tree

2 files changed

+29
-15
lines changed

2 files changed

+29
-15
lines changed

.gitignore

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,39 @@
1+
# os junk
12
.DS_Store
3+
4+
# yarn/typescript build junk
5+
package-lock.json
6+
*.tsbuildinfo
7+
28
# Byte-compiled / optimized / DLL files
39
__pycache__/
410
*.py[cod]
511
*$py.class
12+
.pytest_cache/
613

714
# C extensions
815
*.so
916

1017
# Distribution / packaging
18+
*.egg
19+
*.egg-info/
20+
.eggs/
21+
.installed.cfg
1122
.Python
1223
env/
1324
build/
1425
develop-eggs/
1526
dist/
1627
downloads/
1728
eggs/
18-
.eggs/
29+
jupyterlab_git/labextension/*.tgz
1930
lib/
2031
lib64/
32+
MANIFEST
2133
parts/
2234
sdist/
2335
var/
2436
wheels/
25-
*.egg-info/
26-
.installed.cfg
27-
*.egg
2837

2938
# PyInstaller
3039
# Usually these files are written by a python script from a template
@@ -102,12 +111,11 @@ ENV/
102111
.mypy_cache/
103112
node_modules/
104113

105-
#editors
106-
.vscode/
114+
# jetbrains ide stuff
115+
*.iml
116+
.idea/
107117

108-
package-lock.json
109-
MANIFEST
110-
jupyterlab_git/labextension/*.tgz
111-
.pytest_cache/
112-
*.tsbuildinfo
113-
.pytest_cache/
118+
# vscode ide stuff
119+
*.code-workspace
120+
.history
121+
.vscode

src/widgets/gitClone.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,16 @@ async function makeApiCall(
7979
// try to clone again
8080
response = await model.clone(path, cloneUrl, result.value);
8181
} else {
82-
throw new Error(response.message);
82+
showErrorMessage('Clone failed', response.message, [
83+
Dialog.warnButton({ label: 'DISMISS' })
84+
]);
85+
break;
8386
}
84-
} else if (response.code === 128) {
85-
throw new Error(response.message);
87+
} else {
88+
showErrorMessage('Clone failed', response.message, [
89+
Dialog.warnButton({ label: 'DISMISS' })
90+
]);
91+
break;
8692
}
8793
}
8894
} catch (error) {

0 commit comments

Comments
 (0)