Skip to content

Conversation

@RanMd
Copy link
Contributor

@RanMd RanMd commented Jun 8, 2025

Pull Request

Key Changes

  • Ensures that dry-run mode prevents any real changes to the system, including:

    • GRUB configuration backups and edits
    • GRUB theme application and sed replacements
    • Systemd-boot entry modifications
    • Pacman configuration updates
  • Removes actions that previously ran even during dry-run, such as:

    • Commenting out existing GRUB_THEME lines
    • Applying sed changes to GRUB or loader entries
    • There is no need to use sudo at all
  • Treats --skip options as true no-ops (e.g. skipping theme selection no longer modifies the config).

  • Maintains logging and output for transparency

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update (non-breaking change; modified files are limited to the documentations)
  • Technical debt (a code change that does not fix a bug or add a feature but makes something clearer for devs)
  • Other (provide details below)

Checklist

Please put an x in the boxes that apply:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My commit message follows the commit guidelines.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added a changelog entry.
  • I have added necessary comments/documentation to my code.
  • I have added tests to cover my changes.
  • I have tested my code locally and it works as expected.
  • All new and existing tests passed.

Additional context

Why?

Some operations were still modifying files (e.g., GRUB theme config) even when dry-run mode was active. This goes against user expectations and makes testing riskier. This PR ensures that when dry-run is active, no changes are made—making it safe and predictable.

Notes

  • These changes do not affect normal (non-dry-run) behavior.
  • Behavior under dry-run now matches what is described in the script's intention.
  • I realized right after creating the PR that I pointed to master instead of dev. I've fixed it now. Sorry for the oversight 🙇

…ig changes

- Prevent real system modifications when dry-run mode is active (e.g., bootloader entries).
- Ensure 'skip' options (like grub theme) do not alter current configuration.
- Omitted 'sed' lines that unnecessarily modified out existing GRUB_THEME values.
- Unified dry-run checks across the script for consistency and predictability.
- Style: Improved readability by changing contrasts and minor settings.

Ensures the script behaves as intended during dry-run
@kRHYME7
Copy link
Contributor

kRHYME7 commented Jun 8, 2025

Thanks! Have you tested this on fresh installation?

@kRHYME7
Copy link
Contributor

kRHYME7 commented Jun 8, 2025

@HyDE-Project/testers Thank you in advance ☺️

@Prof-Shiba
Copy link
Member

looks nice!! i'll test it out in the morning

@RanMd
Copy link
Contributor Author

RanMd commented Jun 8, 2025

Thanks! Have you tested this on fresh installation?

Hi, sorry for the delay, and yes, I tested it on a fresh installation, so please review all the code before doing so.

looks nice!! i'll test it out in the morning

Thank you, I hope it helps the project :)

@Prof-Shiba
Copy link
Member

Sorry, a bunch of last minute stuff popped up! LGTM! Everything worked fine 👍

@kRHYME7
Copy link
Contributor

kRHYME7 commented Jun 9, 2025

Hmm should I merge it now? Any changes you need to do @RanMd ?

@RanMd
Copy link
Contributor Author

RanMd commented Jun 10, 2025

Hmm should I merge it now? Any changes you need to do @RanMd ?

Hello bro, of course I already solved the previous review, I would think so.

@kRHYME7 kRHYME7 requested a review from zeerayne June 10, 2025 12:35
Copy link
Contributor

@kRHYME7 kRHYME7 left a comment

Choose a reason for hiding this comment

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

Works as expected! Thank you

@kRHYME7 kRHYME7 merged commit 98338c0 into HyDE-Project:dev Jun 10, 2025
@RanMd
Copy link
Contributor Author

RanMd commented Jun 10, 2025

Nice bro, glad I could help.

@RanMd RanMd deleted the dry-run-refactor branch June 10, 2025 13:05
kRHYME7 added a commit that referenced this pull request Jun 13, 2025
This is an automated PR to promote changes from `dev` to `master`.
Please review and test before merging.


See [TESTING.md](./TESTING.md) for complete testing instructions.


According to our release policy, this PR is expected to be merged on:
**Friday**
Testers are encouraged to test the changes before merging.
Please note that this schedule may be adjusted based on the needs of the
project.

---
* chore Merge branch 'dev' of https://github.com/hyde-project/hyde into
dev (cb99278) by kRHYME7
* fix: [Bug]: Executing `resetxdgportal.sh` on startup may conflict with
systemd services #727 (83ab1b9) by kRHYME7
* chore Merge branch 'master' into dev (5db92ed) by Khing
* chore refactor: hyprlock avoid multiple process (mem leak on
hyprlock?) (c50422e) by kRHYME7
* fix: Rofi launch args should accept array (581ddc7) by kRHYME7
* chore Merge branch 'dev' of https://github.com/hyde-project/hyde into
dev (885d9a8) by kRHYME7
* feat: set Xresource and Xdefaultffor cursors too (c26bc0f) by kRHYME7
* fix: include nixos wrapped program to prevent infinite reloads (#795)
(fda4f70) by Richard Henninger
* chore update: use more flexible flags for electron-based apps (#790)
(b05d1a7) by Ilya Bogdanov
* feat(wl-clip-persist): Keep Wayland clipboard even after programs
close (09c37dc) by kRHYME7
* doc: fix schema for the site (b6b8bf2) by kRHYME7
* fix : [Bug]: Executing `resetxdgportal.sh` on startup may conflict
with systemd services #727 (20a30af) by kRHYME7
* chore Correctly handle -run-command in rofi for uwsm with fall back
(018bfec) by kRHYME7
* chore update: hyprlock minor fixes (#791) (8dbd753) by Ilya Bogdanov
* chore Fix: Question: Disable Rofi Launcher Menu History? #777
(0c7bec4) by kRHYME7
* feat: Schema validations plus default config and md for reference
(91781d3) by kRHYME7
* chore Merge branch 'dev' of https://github.com/hyde-project/hyde into
dev (7fa7e09) by kRHYME7
* chore Merge branch 'master' into dev (0d328ae) by Khing
* chore Merge branch 'dev' of https://github.com/hyde-project/hyde into
dev (10710e6) by kRHYME7
* feat: Handle services for user and root (a57bd1b) by kRHYME7
* chore Improve dry-run consistency and avoid unintended modifications
(#762) (98338c0) by Alexander Luisa
* chore Merge branch 'master' into dev (23c7418) by Khing
* feat: port kanji & roman options of `hyprland/workspaces` waybar
module (#776) (62425da) by Ilya Bogdanov
* fix(gamelauncher): Use 5 as default MODE if not explicitly defined
(2e740ee) by kRHYME7
---

Please review the changes carefully before merging.
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.

4 participants