Skip to content

Commit 2aa4ff3

Browse files
authored
Merge pull request #3152 from codefori/clearSpooledFiles
Always clear mapepire spooled files if not generated by an action
2 parents d652c87 + a07fff6 commit 2aa4ff3

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

src/api/CompileTools.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export namespace CompileTools {
2525
updateProgress?: (message: string) => void
2626
}
2727

28-
export function reset(){
28+
export function reset() {
2929
ileQueue.clear();
3030
jobLogOrdinal = 0;
3131
}
@@ -159,11 +159,9 @@ export namespace CompileTools {
159159
commandResult.code = 2;
160160
callbacks.onStderr?.(Buffer.from(`Failed to get spool output: ${JSON.stringify(e, undefined, 2)}`));
161161
}
162-
finally {
163-
if (!connection.getConfig().keepActionSpooledFiles) {
164-
await connection.runSQL(`@DLTSPLF FILE(*SELECT) SELECT(*CURRENT *ALL *ALL ${connection.splfUserData})`);
165-
}
166-
}
162+
}
163+
if (!start || !connection.getConfig().keepActionSpooledFiles) {
164+
await connection.runSQL(`@DLTSPLF FILE(*SELECT) SELECT(*CURRENT *ALL *ALL ${connection.splfUserData})`);
167165
}
168166
});
169167

0 commit comments

Comments
 (0)