File tree 1 file changed +9
-4
lines changed
1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -6,13 +6,15 @@ const {readStore} = require("../utils/store");
6
6
const args = process . argv . slice ( 2 ) ;
7
7
let name ;
8
8
switch ( args [ 0 ] ) {
9
- case "-r" :
9
+ case "-r" : {
10
10
const random = readStore ( "random-question-info" )
11
11
name = `${ random . id } .${ random . enName } ` ;
12
12
console . log ( `[leet-check]检测当前随机题目:${ name } ` )
13
13
break ;
14
- case "-i" :
15
- id = args [ 1 ] ;
14
+ }
15
+
16
+ case "-i" : {
17
+ let id = args [ 1 ] ;
16
18
const specified = readStore ( "specified-question-info" )
17
19
name = `${ specified . id } .${ specified . enName } ` ;
18
20
if ( id === undefined && name . startsWith ( "undefined" ) ) {
@@ -21,11 +23,14 @@ switch (args[0]) {
21
23
}
22
24
console . log ( `[leet-check]检测题目:${ name } ` )
23
25
break ;
26
+ }
27
+
24
28
case "-t" :
25
- default :
29
+ default : {
26
30
const question = readStore ( "today-question-info" )
27
31
name = `${ question . id } .${ question . enName } ` ;
28
32
console . log ( `[leet-check]检测题目:${ name } ` )
33
+ }
29
34
break ;
30
35
}
31
36
temExe ( 'node ./src/{0}/index.js' , name )
You can’t perform that action at this time.
0 commit comments