Skip to content

Commit 3bbf2be

Browse files
committed
fix git not installed error
Signed-off-by: shmck <[email protected]>
1 parent 99b8604 commit 3bbf2be

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

Diff for: src/channel/index.ts

+12-2
Original file line numberDiff line numberDiff line change
@@ -146,13 +146,22 @@ class Channel implements Channel {
146146
// Should wait for workspace before running otherwise requires access to root folder
147147
const isGitInstalled = await gitVersion()
148148
if (!isGitInstalled) {
149-
this.send({ type: 'GIT_NOT_INSTALLED' })
149+
const error: E.ErrorMessage = {
150+
type: 'GitNotFound',
151+
message: '',
152+
actions: [
153+
{
154+
label: 'Check Again',
155+
transition: 'RETRY',
156+
},
157+
],
158+
}
159+
this.send({ type: 'VALIDATE_SETUP_FAILED', payload: { error } })
150160
return
151161
}
152162
this.send({ type: 'SETUP_VALIDATED' })
153163
return
154164
case 'EDITOR_REQUEST_WORKSPACE':
155-
console.log('request workspace')
156165
openWorkspace()
157166
return
158167
// load step actions (git commits, commands, open files)
@@ -183,6 +192,7 @@ class Channel implements Channel {
183192
// onError(new Error(`Error Markdown file not found for ${action.type}`))
184193
})
185194

195+
// log error to console for safe keeping
186196
console.log(`ERROR:\n ${errorMarkdown}`)
187197

188198
if (errorMarkdown) {

0 commit comments

Comments
 (0)