Skip to content

Commit

Permalink
Don’t unquarantine
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Dec 6, 2022
1 parent 0f2373a commit 1c87047
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions src/prefab/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ export default async function install(pkg: Package, logger?: Logger): Promise<In

const install = await cellar.resolve(pkg)

await unquarantine(install)

const str = [
gray(usePrefix().prettyString()),
install.pkg.project,
Expand Down Expand Up @@ -103,25 +101,6 @@ async function sumcheck(local_SHA: string, url: URL) {
}
}

async function unquarantine(install: Installation) {
if (host().platform != 'darwin') return

/// for now, prevent gatekeeper prompts FIXME sign everything!

// using find because it doesn’t error if it fails
// and it does fail if the file isn’t writable, but we don’t want to make everything writable
// unless we are forced into that in the future

const cmd = [
'find', install.path,
'-xattrname', 'com.apple.quarantine',
'-perm', '-0200', // only if we can write (prevents error messages)
'-exec', 'xattr', '-d', 'com.apple.quarantine', '{}', ';'
]

await run({ cmd })
}

function get_compression() {
if (Deno.env.get("CI")) return 'gz' // in CI CPU is more constrained than bandwidth
if (host().platform == 'darwin') return 'xz' // most users are richer in CPU than bandwidth
Expand Down

0 comments on commit 1c87047

Please sign in to comment.