Skip to content

Commit d2cd978

Browse files
fix(tmpFileManager): prevent from adding twice a file in the tmp file list
1 parent 9379b80 commit d2cd978

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/platforms/ios-instruments/src/utils/tmpFileManager.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ export const writeTmpFile = (fileName: string, content: string): string => {
1111

1212
export const getTmpFilePath = (fileName: string) => {
1313
const filePath = `${os.tmpdir()}/${fileName}`;
14-
tmpFiles.push(filePath);
14+
if (!tmpFiles.includes(filePath)) {
15+
tmpFiles.push(filePath);
16+
}
1517

1618
return filePath;
1719
};

0 commit comments

Comments
 (0)