Debian Codegraph @

debian/patches/01-Fix_tz_build.patch

raw symbols SCIP
1 Description: Patch from unmerged Pull Request #920 that allows rebuilding the
2 timezone databases in Linux.
3 Forwarded: https://github.com/moment/moment-timezone/pull/920
4 Author: Amit Mittal <[email protected]>
5 Updated: Wed Dec 23 17:27:22 2020 +0530Author: Amit Mittal
6
7 --- a/tasks/data-zdump.js
8 +++ b/tasks/data-zdump.js
9 @@ -60,7 +60,14 @@
10 execFile(zdumpBinary, [zdumpVerboseArg, src], { maxBuffer: 20*1024*1024 }, function (err, stdout) {
11 if (err) { throw err; }
12
13 - if (stdout.length === 0) {
14 + let output = normalizePaths(stdout);
15 + let lines = output.split('\n');
16 + let validOutput = lines.some(function (line) {
17 + var parts = line.split(/\s+/);
18 + return parts.length > 13;
19 + });
20 +
21 + if (!validOutput) {
22 // on some systems, when there are no transitions then we have
23 // to get creative to learn the offset and abbreviation
24 execFile(zdumpBinary, ['UTC', src], { maxBuffer: 20*1024*1024 }, function (_err, _stdout) {