Skip to content

Fix LaunchAgents folder creation for inexistent folder - #14053

Merged
raycastbot merged 3 commits into
raycast:mainfrom
stevensd2m:fix-inexistent-folder
Aug 22, 2024
Merged

raycastbot merged 3 commits into
raycast:mainfrom
stevensd2m:fix-inexistent-folder

Conversation

@stevensd2m

@stevensd2m stevensd2m commented Aug 16, 2024 •

Copy link
Copy Markdown
Contributor

Description

  1. Main focus: It seems that the folder LaunchAgents may not be created on every mac. For that reason, I am fixing the file creation guaranteeing that the folder already exists.
  2. Fix bug when there was no match for plist files on the folder. Since it ended up an error, it did not set the agents list, not updating it when it was empty list.
  3. Fix bug if we want to remove a folder (which should not exist) inside the Launch Agents folder.
  4. Some refactoring was applied

Checklist

@raycastbot raycastbot added extension fix / improvement Label for PRs with extension's fix improvements extension: launch-agents Issues related to the launch-agents extension OP is author The OP of the PR is the author of the extension labels Aug 16, 2024
@raycastbot

raycastbot commented Aug 16, 2024 •

Copy link
Copy Markdown
Collaborator

Thank you for your contribution! 🎉

🔔 @stevensd2m you might want to have a look.

You can use this guide to learn how to check out the Pull Request locally in order to test it.

You can expect an initial review within five business days.

@stevensd2m
stevensd2m force-pushed the fix-inexistent-folder branch 2 times, most recently from 5b0873c to 9fa0af8 Compare August 17, 2024 07:28
@stevensd2m
stevensd2m force-pushed the fix-inexistent-folder branch from 9fa0af8 to 8cb0850 Compare August 17, 2024 16:05
@stevensd2m

Copy link
Copy Markdown
Contributor Author

hi @pernielsentikaer 😄 are u the only reviewer or can I ping someone? 🙏

const deleteFile = () => {
try {
execSync(`rm ${selectedFile}`);
execSync(`rm -rf ${selectedFile}`);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about using the built-in feature trash here

@stevensd2m stevensd2m Aug 22, 2024 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but that only accepts a file right? this change adapts so that it can also remove if it is a folder for some reason.

nvm, just saw that it states that it can be handled by folder.

nonetheless, could it be after or do u think necessary on the PR?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can do it later on for sure 🙂

@pernielsentikaer pernielsentikaer self-assigned this Aug 22, 2024

@pernielsentikaer pernielsentikaer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi 👋

Looks good to me, approved 🔥

@raycastbot
raycastbot merged commit dda6b7f into raycast:main Aug 22, 2024
@github-actions

Copy link
Copy Markdown
Contributor

@raycastbot

Copy link
Copy Markdown
Collaborator

🎉 🎉 🎉

We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag.

@stevensd2m
stevensd2m deleted the fix-inexistent-folder branch August 23, 2024 10:49
astrit added a commit to astrit/extensions that referenced this pull request Aug 26, 2024
- raycast#14189 - Fix date starting monday and update default colors
- fix cache calue when no services present (raycast#14192)
- Update scrapbook extension (raycast#14080)
- Update CODEOWNERs
- Update iconpark extension (raycast#14064)
- Update CODEOWNERs
- Update CODEOWNERs
- Update chatgpt extension (raycast#14178)
- Update svgl extension (raycast#14149)
- Update cron extension (raycast#14086)
- [Easydict v2.9.2] 💎 feat: support http API endpoint for OpenAI (raycast#14179)
- Update arc extension (raycast#14185)
- Fix error when reading name from undefined (raycast#14135)
- Update custom-folder extension (raycast#14184)
- Update CODEOWNERs
- [beeminder] Fix data synchronization after a datapoint submission (raycast#14158)
- feat(spotify-player): preference to show only music (raycast#14160)
- Update CODEOWNERs
- Reclaim - Make Smart Habit actions respect override setting / fail API errors silently / only strip planner emojis (raycast#14094)
- Add my new Raycast extension: Dropstab Crypto Toolbox (raycast#14047)
- Update work-time-countdown extension (raycast#14142)
- Update CODEOWNERs
- Add oxford-collocation-dictionary extension (raycast#13959)
- Update \`cPanel\` extension (view dbs + limited add dns record + move url check out of hook) (raycast#14138)
- Update LaunchAgents extension (raycast#14157)
- Update CODEOWNERs
- Add toggle-fn extension (raycast#13942)
- Update remember-the-date extension (raycast#14151)
- [Wikipedia] Add languages (raycast#14167)
- Update CODEOWNERs
- Add thingiverse extension (raycast#13967)
- don\'t show detail if list is empty (raycast#14137)
- Update fantastical extension (raycast#14054)
- Update CODEOWNERs
- Initial commit for @ Profile extension. (raycast#14002)
- Update CODEOWNERs
- Fix LaunchAgents folder creation for inexistent folder (raycast#14053)
- Add Luna Search extension (raycast#14006)
- Update CODEOWNERs
- chore (grafana): use service token instead of api keys (raycast#14087)
- Add \`Remove All Searches\` action for \`spotify-player\` Search command (raycast#14084)
- Update CODEOWNERs
- Added support to select either the NBA or the WNBA - default remains NBA (raycast#13970)
- Update CODEOWNERs
- Update google-search extension (raycast#13887)
- [beeminder] Several updates to the Beeminder extension (raycast#13976)
- Add Bonjour extension (raycast#14046)
- Update claude extension (raycast#14121)
- Update pdf-tools extension (raycast#14118)
- Update cobalt extension (raycast#14052)
- Update CODEOWNERs
- [TablePlus] close raycast#4231 + add dropdown filter (raycast#14116)
- Update app-icon-generator extension (raycast#13847)
- Update CODEOWNERs
- [Everhour] fix raycast#13548 + modernize + add metadata/images,README (raycast#13999)
- Update CODEOWNERs
- [Migadu] cache most results + minor api refactor (raycast#13990)
- Initial version of Threads extension. (raycast#13989)
- Update viacep extension (raycast#14108)
- Deleting my extension ig (raycast#14029)
- [toggl-track] Remove seconds from menubar timer (raycast#13964)
- Update CODEOWNERs
- Add octoprint extension (raycast#13975)
- Update hud.md
- Update CODEOWNERs
- Update text-shortcuts extension (raycast#14033)
- Update vade-mecum extension (raycast#14104)
- Docs: Update the utils docs
- Update CODEOWNERs
- [Notion] Add LaunchContext support for Quick Capture (raycast#13953)
- Update CODEOWNERs
- [Tailwind CSS] Add \`size\` utility classes (raycast#14102)
- [GitHub] Brought back fast browsing to cloned repos. (raycast#13992)
- Update CODEOWNERs
- Add git-buddy extension (raycast#13116)
- Update CODEOWNERs
- [Raycast Notification] Added success and failure notification types (raycast#13958)
- Update CODEOWNERs
- [Linkwarden] fix raycast#13613 (API uses Bearer Auth) (raycast#14070)
- Update olympic-games extension (raycast#14090)
- Update CODEOWNERs
- Update folder search extension (raycast#14077)
- Fix weekdays and change display method
raycastbot pushed a commit that referenced this pull request Aug 27, 2024
* Update cron extension

- #14189 - Fix date starting monday and update default colors
- fix cache calue when no services present (#14192)
- Update scrapbook extension (#14080)
- Update CODEOWNERs
- Update iconpark extension (#14064)
- Update CODEOWNERs
- Update CODEOWNERs
- Update chatgpt extension (#14178)
- Update svgl extension (#14149)
- Update cron extension (#14086)
- [Easydict v2.9.2] 💎 feat: support http API endpoint for OpenAI (#14179)
- Update arc extension (#14185)
- Fix error when reading name from undefined (#14135)
- Update custom-folder extension (#14184)
- Update CODEOWNERs
- [beeminder] Fix data synchronization after a datapoint submission (#14158)
- feat(spotify-player): preference to show only music (#14160)
- Update CODEOWNERs
- Reclaim - Make Smart Habit actions respect override setting / fail API errors silently / only strip planner emojis (#14094)
- Add my new Raycast extension: Dropstab Crypto Toolbox (#14047)
- Update work-time-countdown extension (#14142)
- Update CODEOWNERs
- Add oxford-collocation-dictionary extension (#13959)
- Update \`cPanel\` extension (view dbs + limited add dns record + move url check out of hook) (#14138)
- Update LaunchAgents extension (#14157)
- Update CODEOWNERs
- Add toggle-fn extension (#13942)
- Update remember-the-date extension (#14151)
- [Wikipedia] Add languages (#14167)
- Update CODEOWNERs
- Add thingiverse extension (#13967)
- don\'t show detail if list is empty (#14137)
- Update fantastical extension (#14054)
- Update CODEOWNERs
- Initial commit for @ Profile extension. (#14002)
- Update CODEOWNERs
- Fix LaunchAgents folder creation for inexistent folder (#14053)
- Add Luna Search extension (#14006)
- Update CODEOWNERs
- chore (grafana): use service token instead of api keys (#14087)
- Add \`Remove All Searches\` action for \`spotify-player\` Search command (#14084)
- Update CODEOWNERs
- Added support to select either the NBA or the WNBA - default remains NBA (#13970)
- Update CODEOWNERs
- Update google-search extension (#13887)
- [beeminder] Several updates to the Beeminder extension (#13976)
- Add Bonjour extension (#14046)
- Update claude extension (#14121)
- Update pdf-tools extension (#14118)
- Update cobalt extension (#14052)
- Update CODEOWNERs
- [TablePlus] close #4231 + add dropdown filter (#14116)
- Update app-icon-generator extension (#13847)
- Update CODEOWNERs
- [Everhour] fix #13548 + modernize + add metadata/images,README (#13999)
- Update CODEOWNERs
- [Migadu] cache most results + minor api refactor (#13990)
- Initial version of Threads extension. (#13989)
- Update viacep extension (#14108)
- Deleting my extension ig (#14029)
- [toggl-track] Remove seconds from menubar timer (#13964)
- Update CODEOWNERs
- Add octoprint extension (#13975)
- Update hud.md
- Update CODEOWNERs
- Update text-shortcuts extension (#14033)
- Update vade-mecum extension (#14104)
- Docs: Update the utils docs
- Update CODEOWNERs
- [Notion] Add LaunchContext support for Quick Capture (#13953)
- Update CODEOWNERs
- [Tailwind CSS] Add \`size\` utility classes (#14102)
- [GitHub] Brought back fast browsing to cloned repos. (#13992)
- Update CODEOWNERs
- Add git-buddy extension (#13116)
- Update CODEOWNERs
- [Raycast Notification] Added success and failure notification types (#13958)
- Update CODEOWNERs
- [Linkwarden] fix #13613 (API uses Bearer Auth) (#14070)
- Update olympic-games extension (#14090)
- Update CODEOWNERs
- Update folder search extension (#14077)
- Fix weekdays and change display method

* Update changelog
raycastbot pushed a commit that referenced this pull request Aug 29, 2024
* Update cron extension

- #14189 - Fix date starting monday and update default colors
- fix cache calue when no services present (#14192)
- Update scrapbook extension (#14080)
- Update CODEOWNERs
- Update iconpark extension (#14064)
- Update CODEOWNERs
- Update CODEOWNERs
- Update chatgpt extension (#14178)
- Update svgl extension (#14149)
- Update cron extension (#14086)
- [Easydict v2.9.2] 💎 feat: support http API endpoint for OpenAI (#14179)
- Update arc extension (#14185)
- Fix error when reading name from undefined (#14135)
- Update custom-folder extension (#14184)
- Update CODEOWNERs
- [beeminder] Fix data synchronization after a datapoint submission (#14158)
- feat(spotify-player): preference to show only music (#14160)
- Update CODEOWNERs
- Reclaim - Make Smart Habit actions respect override setting / fail API errors silently / only strip planner emojis (#14094)
- Add my new Raycast extension: Dropstab Crypto Toolbox (#14047)
- Update work-time-countdown extension (#14142)
- Update CODEOWNERs
- Add oxford-collocation-dictionary extension (#13959)
- Update \`cPanel\` extension (view dbs + limited add dns record + move url check out of hook) (#14138)
- Update LaunchAgents extension (#14157)
- Update CODEOWNERs
- Add toggle-fn extension (#13942)
- Update remember-the-date extension (#14151)
- [Wikipedia] Add languages (#14167)
- Update CODEOWNERs
- Add thingiverse extension (#13967)
- don\'t show detail if list is empty (#14137)
- Update fantastical extension (#14054)
- Update CODEOWNERs
- Initial commit for @ Profile extension. (#14002)
- Update CODEOWNERs
- Fix LaunchAgents folder creation for inexistent folder (#14053)
- Add Luna Search extension (#14006)
- Update CODEOWNERs
- chore (grafana): use service token instead of api keys (#14087)
- Add \`Remove All Searches\` action for \`spotify-player\` Search command (#14084)
- Update CODEOWNERs
- Added support to select either the NBA or the WNBA - default remains NBA (#13970)
- Update CODEOWNERs
- Update google-search extension (#13887)
- [beeminder] Several updates to the Beeminder extension (#13976)
- Add Bonjour extension (#14046)
- Update claude extension (#14121)
- Update pdf-tools extension (#14118)
- Update cobalt extension (#14052)
- Update CODEOWNERs
- [TablePlus] close #4231 + add dropdown filter (#14116)
- Update app-icon-generator extension (#13847)
- Update CODEOWNERs
- [Everhour] fix #13548 + modernize + add metadata/images,README (#13999)
- Update CODEOWNERs
- [Migadu] cache most results + minor api refactor (#13990)
- Initial version of Threads extension. (#13989)
- Update viacep extension (#14108)
- Deleting my extension ig (#14029)
- [toggl-track] Remove seconds from menubar timer (#13964)
- Update CODEOWNERs
- Add octoprint extension (#13975)
- Update hud.md
- Update CODEOWNERs
- Update text-shortcuts extension (#14033)
- Update vade-mecum extension (#14104)
- Docs: Update the utils docs
- Update CODEOWNERs
- [Notion] Add LaunchContext support for Quick Capture (#13953)
- Update CODEOWNERs
- [Tailwind CSS] Add \`size\` utility classes (#14102)
- [GitHub] Brought back fast browsing to cloned repos. (#13992)
- Update CODEOWNERs
- Add git-buddy extension (#13116)
- Update CODEOWNERs
- [Raycast Notification] Added success and failure notification types (#13958)
- Update CODEOWNERs
- [Linkwarden] fix #13613 (API uses Bearer Auth) (#14070)
- Update olympic-games extension (#14090)
- Update CODEOWNERs
- Update folder search extension (#14077)
- Fix weekdays and change display method

* Update changelog

* Update cron extension

- Update Detail view
- Add detail and public holidays
- Update title and month to show no gap
- Docs: Update the utils docs
- Update CODEOWNERs
- Update CODEOWNERs
- Add Cursor.sh Doc extension (#14187)
- [Format GraphQL] new action to only format instead of format AND copy (#14217)
- Update CODEOWNERs
- Add metaphorpsum extension (#14124)
- Docs: Update the utils docs
- Update CODEOWNERs
- Add sql-format extension (#14144)
- Update CODEOWNERs
- Add say-no-to-notch extension (#14143)
- Update manifest.md (#14141)
- Add mood track (#14134)
- [NBA-Game-Viewer] Added scores to the viewer (#14188)
- Reduce calls to \`GET:/api/smart-habits\` (#14222)
- Update cron extension (#14199)
- Update CSS*GG (#14202)
- Update CODEOWNERs
- [SnippetSurfer] Make tags optional (#14197)
- Update CODEOWNERs
- [Wikipedia] Move \`igor9silva\` to past contributors (#14214)
- Update CODEOWNERs
- Update CODEOWNERs
- [NBA Game Viewer] Fixes for drop-down default values (#14205)
- [Envato] new logo + TS typing tweaks (minimize use of \`any\`) (#14034)
- [Luna Search] Add menu-bar command for quick access, move to hooks for retrieving data, fix pagination issue, add min-search size (#14174)
- Update CODEOWNERs
- Update Focus extension (#14204)
- Add forgejo extension (#14133)
- Update CODEOWNERs
- Add tidal-controller extension (#14130)
- Update CODEOWNERs
- [Google Maps Search] Travel mode fixes and improvements (#14128)
- Update CODEOWNERs
- Add readeck extension (#14109)
- Update CODEOWNERs
- [diskutil] Upgrades Raycast dependencies for failureToast fix (#14106)
- Update changelog
- #14189 - Fix date starting monday and update default colors

* Add changelog
o4liangdu pushed a commit to o4liangdu/extensions that referenced this pull request Sep 14, 2024
liangdu