bump version to 1.10.4 and add error handling for patch copying on Windows
Some checks are pending
CI / general (push) Waiting to run

This commit is contained in:
mr. M 2025-03-14 13:10:03 +01:00
parent 488575eaee
commit 811acaa819
No known key found for this signature in database
GPG key ID: CBD57A2AEDBDA1FB
2 changed files with 23 additions and 20 deletions

View file

@ -1,6 +1,6 @@
{ {
"name": "@zen-browser/surfer", "name": "@zen-browser/surfer",
"version": "1.10.3", "version": "1.10.4",
"description": "Simplifying building firefox forks!", "description": "Simplifying building firefox forks!",
"main": "index.js", "main": "index.js",
"bin": { "bin": {

View file

@ -35,26 +35,29 @@ export const copyManual = async (
) { ) {
await remove(resolve(dest, ...getChunked(name))) await remove(resolve(dest, ...getChunked(name)))
} }
try {
if (
process.platform == 'win32' &&
!config.buildOptions.windowsUseSymbolicLinks
) {
// Make the directory if it doesn't already exist.
await mkdirp(dirname(resolve(dest, ...getChunked(name))))
if ( // By default, windows users do not have access to the permissions to create
process.platform == 'win32' && // symbolic links. As a work around, we will just copy the files instead
!config.buildOptions.windowsUseSymbolicLinks await copyFile(
) { resolve(placeToCheck, ...getChunked(name)),
// Make the directory if it doesn't already exist. resolve(dest, ...getChunked(name))
await mkdirp(dirname(resolve(dest, ...getChunked(name)))) )
} else {
// By default, windows users do not have access to the permissions to create // Create the symlink
// symbolic links. As a work around, we will just copy the files instead await ensureSymlink(
await copyFile( resolve(placeToCheck, ...getChunked(name)),
resolve(placeToCheck, ...getChunked(name)), resolve(dest, ...getChunked(name))
resolve(dest, ...getChunked(name)) )
) }
} else { } catch (e) {
// Create the symlink console.error(e) // Just in case we have an error
await ensureSymlink(
resolve(placeToCheck, ...getChunked(name)),
resolve(dest, ...getChunked(name))
)
} }
const gitignore = readFileSync(resolve(ENGINE_DIR, '.gitignore')).toString() const gitignore = readFileSync(resolve(ENGINE_DIR, '.gitignore')).toString()