Skip to content

Commit eee7bf8

Browse files
committed
exits gracefully if at-driver already installed
1 parent 8f79e08 commit eee7bf8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

shared/install/macos.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ const promptForManualKeyPress = async () => {
8383
* @param {boolean} options.unattended - Whether installation should fail if
8484
* human intervention is required
8585
*
86-
* @returns {Promise<void>}
86+
* @returns {Promise<boolean>}
8787
*/
8888
exports.install = async function ({ unattended }) {
8989
const options = await getExecOptions();
@@ -103,13 +103,14 @@ exports.install = async function ({ unattended }) {
103103
}
104104

105105
if (await isInstalled()) {
106-
throw new Error('Already installed');
106+
return false;
107107
}
108108

109109
await removeQuarantine(options);
110110
await registerExtensions(options);
111111
await enableExtension();
112112
await setSystemVoice(VOICE_IDENTIFIER);
113+
return true;
113114
};
114115

115116
/**

0 commit comments

Comments
 (0)