Skip to content

Commit daf49ef

Browse files
Merge branch 'main' into 242-database-fails-to-be-killed-and-deleted-on-windows-with-node-23x
2 parents 33110ff + b37a8b3 commit daf49ef

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

tests/ci/DirMoveGitHubActions.ts

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@ import os from 'os';
22
import fs from 'fs';
33
import fsPromises from 'fs/promises'
44

5-
const originalPath = `${os.tmpdir()}/mysqlmsn`
6-
if (process.env.MOVE_MYSQLMSN_TO && fs.existsSync(originalPath) && originalPath !== process.env.MOVE_MYSQLMSN_TO) {
7-
console.log('Moving MySQLMSN directory to other path for GitHub Actions upload')
8-
await fsPromises.cp(originalPath, process.env.MOVE_MYSQLMSN_TO, {recursive: true, force: true, filter: source => !source.includes('.sock')})
9-
await fsPromises.rm(originalPath, {force: true, recursive: true, maxRetries: 50, retryDelay: 100})
10-
} else {
11-
console.log('Skipping MySQLMSN directory move as conditions are not met.')
12-
}
5+
async function main() {
6+
const originalPath = `${os.tmpdir()}/mysqlmsn`
7+
if (process.env.MOVE_MYSQLMSN_TO && fs.existsSync(originalPath) && originalPath !== process.env.MOVE_MYSQLMSN_TO) {
8+
console.log('Moving MySQLMSN directory to other path for GitHub Actions upload')
9+
await fsPromises.cp(originalPath, process.env.MOVE_MYSQLMSN_TO, {recursive: true, force: true, filter: source => !source.includes('.sock')})
10+
await fsPromises.rm(originalPath, {force: true, recursive: true, maxRetries: 50, retryDelay: 100})
11+
} else {
12+
console.log('Skipping MySQLMSN directory move as conditions are not met.')
13+
}
14+
}
15+
16+
main()

0 commit comments

Comments
 (0)