This repository was archived by the owner on Mar 22, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,10 @@ module.exports = async () => {
10
10
11
11
let langInfo = require ( '../langs/' + args . lang ) ;
12
12
13
+ if ( ! langInfo ) {
14
+ throw new Error ( "No such language" ) ;
15
+ }
16
+
13
17
await createReadme ( langInfo ) ;
14
18
15
19
} ;
Original file line number Diff line number Diff line change @@ -20,6 +20,10 @@ module.exports = async () => {
20
20
throw new Error ( "Must have --lang or --all" ) ;
21
21
}
22
22
23
+ if ( args . lang && ! config . langs [ args . lang ] ) {
24
+ throw new Error ( "No such language" ) ;
25
+ }
26
+
23
27
let langs = args . all ? Object . values ( config . langs ) . filter ( l => l . code !== 'en' ) : [ config . langs [ args . lang ] ] ;
24
28
25
29
for ( let langInfo of langs ) {
Original file line number Diff line number Diff line change @@ -13,6 +13,12 @@ module.exports = async () => {
13
13
throw new Error ( "Must have --lang or --all" ) ;
14
14
}
15
15
16
+
17
+ if ( args . lang && ! config . langs [ args . lang ] ) {
18
+ throw new Error ( "No such language" ) ;
19
+ }
20
+
21
+
16
22
let langs = args . all ? Object . values ( config . langs ) . filter ( l => l . code !== 'en' ) : [ config . langs [ args . lang ] ] ;
17
23
18
24
for ( let langInfo of langs ) {
You can’t perform that action at this time.
0 commit comments