Skip to content

Commit 87508c1

Browse files
est7dehesa
authored andcommitted
fix: Move icon-gemini.svg to the correct directory
Relocated the icon to align with the updated folder structure. This improves organization and prevents potential referencing issues.
1 parent 7630801 commit 87508c1

File tree

2 files changed

+30
-8
lines changed

2 files changed

+30
-8
lines changed

commands/ai/gemini/gemini.js

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
// @raycast.packageName Gemini
1818

1919
// Optional parameters:
20-
// @raycast.icon ../images/icon-gemini.svg
20+
// @raycast.icon ./images/icon-gemini.svg
2121
// @raycast.argument1 { "type": "text", "placeholder": "Selected Text", "optional": true }
2222
// @raycast.argument2 { "type": "text", "placeholder": "Prompt"}
2323

@@ -52,15 +52,37 @@ function sleep(ms) {
5252
while (Date.now() - start < ms) {}
5353
}
5454

55-
try {
56-
execSync("which chrome-cli");
57-
} catch {
58-
console.error(
59-
"chrome-cli is required to run this script (https://github.com/prasmussen/chrome-cli)",
60-
);
61-
process.exit(1);
55+
/**
56+
* Verifies that all required dependencies are installed.
57+
* Exits the process with an error message if any dependency is missing.
58+
*/
59+
function checkDependencies() {
60+
// Check if Google Chrome is installed
61+
try {
62+
execSync("osascript -e 'tell application \"Google Chrome\" to get version'" , { stdio: "ignore" });
63+
} catch {
64+
try {
65+
execSync("osascript -e 'tell application \"Chrome\" to get version'" , { stdio: "ignore" });
66+
} catch {
67+
console.error("Google Chrome is required to run this script");
68+
process.exit(1);
69+
}
70+
}
71+
72+
// Check if chrome-cli is installed
73+
try {
74+
execSync("which chrome-cli");
75+
} catch {
76+
console.error(
77+
"chrome-cli is required to run this script (https://github.com/prasmussen/chrome-cli)"
78+
);
79+
process.exit(1);
80+
}
6281
}
6382

83+
// Verify all dependencies are installed
84+
checkDependencies();
85+
6486
// Bring Chrome to the foreground first.
6587
try {
6688
// Try to activate Chrome through AppleScript, supporting different possible application names.

0 commit comments

Comments
 (0)