Bug 38664: The tidy script - fix race condition
There was a race condition, edit_file trying to open it while it was not fully written by prettier (?) This is a dirty fix but it seems to do the trick. The error was: edit_file 'koha-tmpl/intranet-tmpl/prog/en/includes/cat-search.inc' - write_file: No such file or directory at misc/devel/tidy.pl line 149. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
0cdaf9935f
commit
4a7a8fbef1
|
|
@ -138,6 +138,8 @@ sub tidy_tt {
|
|||
run( command => sprintf q{yarn --silent run prettier --write %s}, $file );
|
||||
if ($success) {
|
||||
|
||||
while ( !-f $file ) { sleep 1; }
|
||||
|
||||
# Revert the substitutions done by the prettier plugin
|
||||
edit_file sub {
|
||||
s#<!--</head>-->#</head>#g;
|
||||
|
|
|
|||
Loading…
Reference in New Issue