File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ async function watchMain(): Promise<void> {
15
15
await context . watch ( ) ;
16
16
await context . serve ( { servedir : "./dist/" } ) ;
17
17
}
18
- async function watchDictionary ( ) : Promise < never > {
18
+ async function watchDictionary ( ) : Promise < number > {
19
19
const command = new Deno . Command ( Deno . execPath ( ) , {
20
20
args : [
21
21
"run" ,
@@ -36,12 +36,13 @@ async function watchDictionary(): Promise<never> {
36
36
const process = command . spawn ( ) ;
37
37
const status = await process . status ;
38
38
assert ( ! status . success ) ;
39
- Deno . exit ( status . code ) ;
39
+ return status . code ;
40
40
}
41
41
if ( import . meta. main ) {
42
42
if ( ! await exists ( new URL ( "../dictionary/dictionary.ts" , import . meta. url ) ) ) {
43
43
const Dictionary = await import ( "../dictionary/build.ts" ) ;
44
44
await Dictionary . build ( ) ;
45
45
}
46
- await Promise . all ( [ watchDictionary ( ) , watchMain ( ) ] ) ;
46
+ const [ statusCode ] = await Promise . all ( [ watchDictionary ( ) , watchMain ( ) ] ) ;
47
+ Deno . exit ( statusCode ) ;
47
48
}
You can’t perform that action at this time.
0 commit comments