Skip to content

Commit

Permalink
fix: don't try to write db file if already exists
Browse files Browse the repository at this point in the history
  • Loading branch information
jlp-craigmorten committed Nov 19, 2023
1 parent 1e8aa2c commit 12dfced
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@guidepup/setup",
"version": "0.11.1",
"version": "0.11.2",
"description": "Setup your environment for screen-reader automation.",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
Expand Down
3 changes: 2 additions & 1 deletion src/macOS/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { logInfo } from "../logging";
import { ERR_MACOS_REQUIRES_MANUAL_USER_INTERACTION } from "../errors";
import { enableDoNotDisturb } from "./enableDoNotDisturb";
import { record } from "./record";
import { enabledDbFile } from "./isAppleScriptControlEnabled/enabledDbFile";

const isCi = process.argv.includes("--ci");
const isRecorded = process.argv.includes("--record");
Expand Down Expand Up @@ -39,7 +40,7 @@ export async function setup(): Promise<void> {
await enableDoNotDisturb();
}

if (!isSipEnabled()) {
if (!isSipEnabled() && !(await enabledDbFile())) {
writeDatabaseFile();

return;
Expand Down

0 comments on commit 12dfced

Please sign in to comment.