fix(tracing): check if source exists before adding to zip (#10986)
This commit is contained in:
parent
0d277fa589
commit
eb9c8a8f06
|
|
@ -223,10 +223,12 @@ export class Tracing implements InstrumentationListener, SnapshotterDelegate, Ha
|
||||||
sourceEntries = [];
|
sourceEntries = [];
|
||||||
for (const value of state.sources) {
|
for (const value of state.sources) {
|
||||||
const entry = { name: 'resources/src@' + calculateSha1(value) + '.txt', value };
|
const entry = { name: 'resources/src@' + calculateSha1(value) + '.txt', value };
|
||||||
if (params.mode === 'compressTraceAndSources')
|
if (params.mode === 'compressTraceAndSources') {
|
||||||
entries.push(entry);
|
if (fs.existsSync(entry.value))
|
||||||
else
|
entries.push(entry);
|
||||||
|
} else {
|
||||||
sourceEntries.push(entry);
|
sourceEntries.push(entry);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue