Skip to content

feat(dotfiles): enhance setup script with login manager commands#150

Merged
shiron-dev merged 2 commits intomainfrom
feat/login
Jul 6, 2025
Merged

feat(dotfiles): enhance setup script with login manager commands#150
shiron-dev merged 2 commits intomainfrom
feat/login

Conversation

@shiron-dev
Copy link
Owner

  • Added commands to check and import configurations using the login manager in the setup script.
  • This improvement streamlines the setup process by integrating login management functionalities.

- Added commands to check and import configurations using the login manager in the setup script.
- This improvement streamlines the setup process by integrating login management functionalities.
@github-actions
Copy link
Contributor

github-actions bot commented Jul 6, 2025

PRのスコープが正しくありません。
現在のスコープ: setup
検知したスコープ: dotfiles

@shiron-dev shiron-dev changed the title feat(setup): enhance setup script with login manager commands feat(dotfiles): enhance setup script with login manager commands Jul 6, 2025
@shiron-dev shiron-dev force-pushed the feat/login branch 3 times, most recently from 549a8f3 to be1536f Compare July 6, 2025 16:28
@shiron-dev shiron-dev enabled auto-merge (squash) July 6, 2025 16:29
@shiron-dev shiron-dev disabled auto-merge July 6, 2025 16:29
- Refactored the `_get_current_items_as_yaml` function to directly pipe the output of the `osascript` command into the while loop, improving readability and efficiency.
- Added a `trap` command to ensure the temporary YAML file is removed upon exit, enhancing resource management.
- Removed redundant `rm` command for the temporary file, as cleanup is now handled by the trap.

These changes aim to simplify the script and ensure better handling of temporary files.

fix(login_manager): improve error handling for osascript commands

- Added error checks for `osascript` commands in `_get_current_items_as_yaml` and `import_login_items` functions to handle failures gracefully.
- Enhanced user feedback by printing error messages to stderr when `osascript` commands fail, ensuring better debugging and user awareness.
- Wrapped the temporary YAML file handling in a subshell to maintain scope and improve readability.

These changes aim to enhance the robustness of the login manager script by ensuring that errors are properly reported and handled.
@shiron-dev shiron-dev enabled auto-merge (squash) July 6, 2025 16:31
@shiron-dev shiron-dev merged commit acba670 into main Jul 6, 2025
10 checks passed
@shiron-dev shiron-dev deleted the feat/login branch July 6, 2025 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant