fix(unpack): use atomic renames to flatten nested output and make unpacking more reliable
This commit is contained in:
@@ -130,11 +130,9 @@ export class FsHelpers {
|
||||
|
||||
/**
|
||||
* Move/rename a file or directory
|
||||
* Uses renameSync for reliability on XFS/mounted filesystems where async
|
||||
* rename can be interrupted by signals from process managers
|
||||
*/
|
||||
public static async move(src: string, dest: string): Promise<void> {
|
||||
fs.renameSync(src, dest);
|
||||
await fs.promises.rename(src, dest);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user