diff --git a/package.json b/package.json index 72e9462..646b955 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@zen-browser/surfer", - "version": "1.10.3", + "version": "1.10.4", "description": "Simplifying building firefox forks!", "main": "index.js", "bin": { diff --git a/src/commands/patches/copy-patches.ts b/src/commands/patches/copy-patches.ts index 969f309..8b0454b 100644 --- a/src/commands/patches/copy-patches.ts +++ b/src/commands/patches/copy-patches.ts @@ -35,26 +35,29 @@ export const copyManual = async ( ) { 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 ( - process.platform == 'win32' && - !config.buildOptions.windowsUseSymbolicLinks - ) { - // Make the directory if it doesn't already exist. - await mkdirp(dirname(resolve(dest, ...getChunked(name)))) - - // By default, windows users do not have access to the permissions to create - // symbolic links. As a work around, we will just copy the files instead - await copyFile( - resolve(placeToCheck, ...getChunked(name)), - resolve(dest, ...getChunked(name)) - ) - } else { - // Create the symlink - await ensureSymlink( - resolve(placeToCheck, ...getChunked(name)), - resolve(dest, ...getChunked(name)) - ) + // By default, windows users do not have access to the permissions to create + // symbolic links. As a work around, we will just copy the files instead + await copyFile( + resolve(placeToCheck, ...getChunked(name)), + resolve(dest, ...getChunked(name)) + ) + } else { + // Create the symlink + await ensureSymlink( + resolve(placeToCheck, ...getChunked(name)), + resolve(dest, ...getChunked(name)) + ) + } + } catch (e) { + console.error(e) // Just in case we have an error } const gitignore = readFileSync(resolve(ENGINE_DIR, '.gitignore')).toString()