Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit13292c8

Browse files
committed
run remote check after init
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
1 parent98932e0 commit13292c8

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

‎src/actions/tutorialConfig.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ const tutorialConfig = async (
2727
})
2828
})
2929

30+
try{
31+
awaitgit.checkRemoteConnects(config.repo)
32+
}catch(error){
33+
onError(error)
34+
handleError({title:'Error connecting to Git repo',description:error.message})
35+
}
36+
3037
// TODO if remote not already set
3138
awaitgit.setupRemote(config.repo.uri).catch((error)=>{
3239
onError(error)

‎src/channel/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import tutorialConfig from '../actions/tutorialConfig'
88
import{COMMANDS}from'../editor/commands'
99
importloggerfrom'../services/logger'
1010
importContextfrom'./context'
11-
import{versionasgitVersion,checkRemoteConnects}from'../services/git'
11+
import{versionasgitVersion}from'../services/git'
1212
import{openWorkspace,checkWorkspaceEmpty}from'../services/workspace'
1313

1414
interfaceChannel{
@@ -86,12 +86,12 @@ class Channel implements Channel {
8686
// setup tutorial config (save watcher, test runner, etc)
8787
awaitthis.context.setTutorial(this.workspaceState,data)
8888

89-
awaittutorialConfig({config:data.config},onError)
90-
9189
try{
92-
awaitcheckRemoteConnects(data.config.repo)
90+
// TODO: better handle errors
91+
awaittutorialConfig({config:data.config},onError)
9392
}catch(error){
94-
this.send({type:'GIT_REMOTE_FAILED',payload:{message:error.message}})
93+
// TODO send failure messages back to client
94+
// to show errors in the webview
9595
}
9696

9797
// report back to the webview that setup is complete

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp