Commit Graph
9 Commits
Author SHA1 Message Date
sankalp 0219f1c8ce refactor(src/utils): improve error handling and messaging in system utilitiesNew Features
- None

Enhancements- Added detailed error reporting with exit codes for privilege escalation, initramfs rebuild, service management, and session termination
- Implemented graceful handling of permission‑setting failures with proper logging
- Enhanced error messages for systemctl and loginctl commands, providing clearer diagnostics

Bug Fixes- Fixed incomplete error propagation in status matching, now reports actual exit codes or underlying errors
2026-05-25 14:50:00 +05:45
sankalp 73e1edfd97 fix(src/utils): add warning for unknowndistribution when rebuilding initramfs
Log a warning when the initramfs rebuild is skipped because the distribution is unknown, ensuring the user is informed.

New Features
- None

Enhancements
- Added explicit warning for unknown distributions to prevent silent skips
- Improved logging clarity in rebuild_initramfs

Bug Fixes
- Fixed missing warning path that could hide build issues on unsupported distros
2026-05-25 13:36:23 +05:45
sankalp 055fdcd500 refactor(src/utils): remove systemd-inhibit handling from rebuild_initramfsSimplify command construction by dropping unused inhibition logic.
- New Features:
- Enhancements: Simplified command construction in rebuild_initramfs.
- Bug Fixes: Resolved potential error when systemd-inhibit is unavailable.
2026-05-08 22:07:49 +05:45
sankalp b0fdc0d58e fuck it forgot to commit all those changes 2026-03-22 15:05:45 +05:45
sankalp 7846c1f5d2 refactor(src/utils): refactor directory creation and permission handling in create_file
- New Features
- Enhancements: Simplify directory creation error handling
- Bug Fixes: Ensure proper early return when creating parent directories fails
2026-03-12 00:48:11 +05:45
sankalp 3551b973d1 refactor(src/utils): simplify directory creation and systemd-inhibit check
- Enhancements: Refactored conditional logic in create_file and rebuild_initramfs to reduce nesting and improve readability
2026-03-12 00:42:01 +05:45
sankalp 05c8a3bd87 fix(src/utils): fix missing braces and improve conditional logic for rebuild_initramfs detection
Why: Ensure correct detection of EndeavourOS and provide clearer command building for initramfs.

- New Features: Added explicit multi‑condition detection with proper braces for EndeavourOS handling.
- Enhancements: Improved readability of systemd‑inhibit command construction.
- Bug Fixes: Resolved syntax issue that could cause command generation failure.
2026-03-12 00:27:46 +05:45
sankalp d0b43db8ed feat(src/utils): add system utilities module
Create utilities for root checking, file creation with permissions, display manager detection, and initramfs rebuild.

- New Features
  - Introduce `system` module with `assert_root`, `create_file`, `get_display_manager`, and `rebuild_initramfs` functions.
- Enhancements
  - Add comprehensive logging (info, debug, warn, error) and debug output.
  - Implement directory creation and executable permission handling.
  - Wrap initramfs rebuild commands with `systemd-inhibit` when available.
- Bug Fixes
  - None
2026-03-11 23:32:03 +05:45
sankalp d7e698d29d feat(src/utils): add system module placeholder
Add empty system.rs file in src/utils as a placeholder for future system utilities.

- New Features
  - Add system module skeleton
- Enhancements
- Bug Fixes
2026-03-11 22:18:17 +05:45