File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -36,8 +36,8 @@ const handler = (request, response) => {
36
36
37
37
let stats = fs . statSync ( filename , { throwIfNoEntry : false } ) ;
38
38
if ( ! stats ?. isFile ( ) && ! filename . match ( / \. [ A - Z a - z 0 - 9 ] { 1 , 11 } $ / ) ) {
39
- filename += ".html" ;
40
- stats = fs . statSync ( filename , { throwIfNoEntry : false } ) ;
39
+ filename += ".html" ;
40
+ stats = fs . statSync ( filename , { throwIfNoEntry : false } ) ;
41
41
}
42
42
try {
43
43
if ( ! stats ?. isFile ( ) ) throw new Error ( `Not a file: ${ filename } ` ) ;
Original file line number Diff line number Diff line change @@ -196,7 +196,7 @@ def genbook(language_code, &get_content)
196
196
end
197
197
198
198
images . each do |path |
199
- content = get_content . call ( path )
199
+ content = get_content . call ( path , :gently => true )
200
200
csection . saveImage ( path , content )
201
201
rescue Errno ::ENOENT
202
202
begin
@@ -289,11 +289,11 @@ def remote_genbook2(language_code)
289
289
# Generate book html directly from local git repo"
290
290
def local_genbook2 ( language_code , worktree_path )
291
291
if language_code && worktree_path
292
- book = genbook ( language_code ) do |filename |
292
+ book = genbook ( language_code ) do |filename , options = { } |
293
293
File . open ( File . join ( worktree_path , filename ) , "r" ) { |infile | File . read ( infile ) }
294
- rescue
295
- puts "::error::#{ filename } is missing!"
296
- "**ERROR**: _ #{ filename } is missing_"
294
+ rescue => e
295
+ puts "::error::#{ filename } is missing!" unless options [ :gently ]
296
+ raise e
297
297
end
298
298
book . sha = `git -C "#{ worktree_path } " rev-parse HEAD` . chomp
299
299
if language_code == 'en'
You can’t perform that action at this time.
0 commit comments