replace got with axios, and add macOS sign support with pr #1049

This commit is contained in:
oxmc
2025-12-07 01:11:41 -08:00
parent ddc6103e43
commit 5522ecde39
13 changed files with 2408 additions and 6380 deletions
+9 -4
View File
@@ -1,17 +1,22 @@
const { mkdtemp, copyFile } = require('fs/promises')
const { mkdtemp, copyFile, realpath } = require('fs/promises')
const os = require('os')
const path = require('path')
const rimraf = require('rimraf')
const cp = require('child_process')
async function runTests() {
const tempdir = await mkdtemp(path.join(os.tmpdir(), 'nexe-integration-tests-'))
const tempdir = await realpath(await mkdtemp(path.join(os.tmpdir(), 'nexe-integration-tests-')))
const secondTempdir = await mkdtemp(path.join(os.tmpdir(), 'nexe-integration-tests-without-executable-'))
const executable = path.join(tempdir, path.basename(process.argv[0]))
await copyFile(process.argv[0], executable)
process.on('beforeExit', () => {
rimraf.sync(tempdir)
rimraf.sync(secondTempdir)
try {
rimraf.sync(tempdir)
rimraf.sync(secondTempdir)
} catch(e) {
console.error(`Ignoring error during integration test cleanup of "${tempdir}".`)
console.error(`Error: ${e}`)
}
})
console.error('Running integration tests with the binary in the current working directory.')
spawnExecutable(tempdir, () => {