File tree 3 files changed +10
-3
lines changed
3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ async function build (args: string[]) {
91
91
// parse yaml skeleton config
92
92
let skeleton
93
93
try {
94
- skeleton = yamlParser . load ( _yaml )
94
+ skeleton = yamlParser . load ( _yaml ) as T . TutorialSkeleton
95
95
if ( ! skeleton || ! Object . keys ( skeleton ) . length ) {
96
96
throw new Error ( `Skeleton at "${ options . yaml } " is invalid` )
97
97
}
Original file line number Diff line number Diff line change 9
9
createTestRunner
10
10
} from './utils/exec'
11
11
import { getCommits , CommitLogObject } from './utils/commits'
12
+ import { TutorialSkeleton } from '../typings/tutorial'
12
13
13
14
interface Options {
14
15
yaml : string
@@ -34,14 +35,15 @@ async function validate (args: string[]) {
34
35
// parse yaml config
35
36
let skeleton
36
37
try {
37
- skeleton = yamlParser . load ( _yaml )
38
+ skeleton = yamlParser . load ( _yaml ) as TutorialSkeleton
38
39
39
40
if ( ! skeleton ) {
40
41
throw new Error ( 'Invalid yaml file contents' )
41
42
}
42
43
} catch ( e ) {
43
44
console . error ( 'Error parsing yaml' )
44
45
console . error ( e . message )
46
+ return
45
47
}
46
48
47
49
const codeBranch : string = skeleton . config . repo . branch
@@ -106,7 +108,7 @@ async function validate (args: string[]) {
106
108
await cherryPick ( stepSetupCommits )
107
109
}
108
110
// run commands
109
- if ( step . setup . commands ) {
111
+ if ( step ? .setup ? .commands ) {
110
112
console . info ( `--- Running setup commands...` )
111
113
await runCommands ( step . setup . commands )
112
114
}
Original file line number Diff line number Diff line change @@ -86,3 +86,8 @@ export interface TutorialDependency {
86
86
export interface TutorialAppVersions {
87
87
vscode : string
88
88
}
89
+
90
+ export interface TutorialSkeleton {
91
+ config : TutorialConfig
92
+ levels : Level [ ]
93
+ }
You can’t perform that action at this time.
0 commit comments