Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 543493c

Browse filesBrowse files
RaisinTenrichardlau
authored andcommitted
tools: fix timezone update tool
The spawnSync call was previously silently failing with this error: ```sh icupkg: unable to open input file "icudt*.dat" ``` because spawnSync doesn't support globbing. This change replaces the spawnSync call with execSync because that supports globbing. I have tested this workflow with some minor modifications in my fork and I can confirm that it works as expected now. The bot opened this PR - RaisinTen#2 which updates deps/icu-small/source/data/in/icudt71l.dat.bz2. Fixes: #44865 Signed-off-by: Darshan Sen <raisinten@gmail.com> PR-URL: #44870 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent 197df63 commit 543493c
Copy full SHA for 543493c

File tree

Expand file treeCollapse file tree

1 file changed

+2
-8
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-8
lines changed
Open diff view settings
Collapse file

‎tools/update-timezone.mjs‎

Copy file name to clipboardExpand all lines: tools/update-timezone.mjs
+2-8Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env node
22
// Usage: tools/update-timezone.mjs
3-
import { execSync, spawnSync } from 'node:child_process';
3+
import { execSync } from 'node:child_process';
44
import { renameSync, readdirSync, rmSync } from 'node:fs';
55
import { exit } from 'node:process';
66

@@ -26,13 +26,7 @@ if (latestVersion === currentVersion) {
2626
execSync('bzip2 -d deps/icu-small/source/data/in/icudt*.dat.bz2');
2727
fileNames.forEach((file) => {
2828
renameSync(`icu-data/tzdata/icunew/${latestVersion}/44/le/${file}`, `deps/icu-small/source/data/in/${file}`);
29-
spawnSync(
30-
'icupkg', [
31-
'-a',
32-
file,
33-
'icudt*.dat',
34-
], { cwd: 'deps/icu-small/source/data/in/' }
35-
);
29+
execSync(`icupkg -a ${file} icudt*.dat`, { cwd: 'deps/icu-small/source/data/in/' });
3630
rmSync(`deps/icu-small/source/data/in/${file}`);
3731
});
3832
execSync('bzip2 -z deps/icu-small/source/data/in/icudt*.dat');

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.