[PR #6095] [CLOSED] Fixed the previous fix of the anti-nag hook #6361

Closed
opened 2025-11-20 07:10:14 -05:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/community-scripts/ProxmoxVE/pull/6095
Author: @imcrazytwkr
Created: 7/20/2025
Status: Closed

Base: mainHead: fix-no-nag


📝 Commits (1)

  • 3365d7d Fixed the previous fix on anti-nag hook

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 tools/pve/post-pve-install.sh (+1 -1)

📄 Description

✍️ Description

Yesterday's fix of the anti-nag apt hook had some unintended side effects as reported today by @memesalot and @vsc55 in #6078. This PR fixes this. What is being done in particular:

  • && chaining is replaced back with an if-condition because otherwise the hook returns with a non-0 exit code when JS patching is not needed and apt scares users with an error message
  • dpkg -V check has been replaced with a grep -F check to avoid stdout leaking ??5?????? /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js (I couldn't reproduce that on my installs, glad others helped with testing)

Draft until this concern by @vsc55 is resolved:

I mean that the new sed syntax is not compatible with older versions of the pve js file.

Link: #6078
Link: #6084

Prerequisites (X in brackets)

  • Self-review completed – Code follows project standards.
  • Tested thoroughly – Changes work as expected. This time also tested by @vsc55: message link
  • No security risks – No hardcoded secrets, unnecessary privilege escalations, or permission issues.

🛠️ Type of Change (X in brackets)

  • 🐞 Bug fix – Resolves an issue without breaking functionality.
  • New feature – Adds new, non-breaking functionality.
  • 💥 Breaking change – Alters existing functionality in a way that may require updates.
  • 🆕 New script – A fully functional and tested script or script set.
  • 🌍 Website update – Changes to website-related JSON files or metadata.
  • 🔧 Refactoring / Code Cleanup – Improves readability or maintainability without changing functionality.
  • 📝 Documentation update – Changes to README, AppName.md, CONTRIBUTING.md, or other docs.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/community-scripts/ProxmoxVE/pull/6095 **Author:** [@imcrazytwkr](https://github.com/imcrazytwkr) **Created:** 7/20/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix-no-nag` --- ### 📝 Commits (1) - [`3365d7d`](https://github.com/community-scripts/ProxmoxVE/commit/3365d7dedc70e299af4e097ee961263a100c9c0d) Fixed the previous fix on anti-nag hook ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `tools/pve/post-pve-install.sh` (+1 -1) </details> ### 📄 Description ## ✍️ Description [Yesterday's fix](https://github.com/community-scripts/ProxmoxVE/pull/6084) of the anti-nag apt hook had some unintended side effects as reported today by @memesalot and @vsc55 in #6078. This PR fixes this. What is being done in particular: - `&&` chaining is replaced back with an if-condition because otherwise the hook returns with a non-0 exit code when JS patching is not needed and `apt` scares users with an error message - `dpkg -V` check has been replaced with a `grep -F` check to avoid stdout leaking `??5?????? /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js` (I couldn't reproduce that on my installs, glad others helped with testing) **Draft until this concern by @vsc55 is resolved:** > I mean that the new sed syntax is not compatible with older versions of the pve js file. ## 🔗 Related PR / Issue Link: #6078 Link: #6084 ## ✅ Prerequisites (**X** in brackets) - [x] **Self-review completed** – Code follows project standards. - [x] **Tested thoroughly** – Changes work as expected. This time also tested by @vsc55: [message link](https://github.com/community-scripts/ProxmoxVE/issues/6078#issuecomment-3094439446) - [x] **No security risks** – No hardcoded secrets, unnecessary privilege escalations, or permission issues. --- ## 🛠️ Type of Change (**X** in brackets) - [x] 🐞 **Bug fix** – Resolves an issue without breaking functionality. - [ ] ✨ **New feature** – Adds new, non-breaking functionality. - [ ] 💥 **Breaking change** – Alters existing functionality in a way that may require updates. - [ ] 🆕 **New script** – A fully functional and tested script or script set. - [ ] 🌍 **Website update** – Changes to website-related JSON files or metadata. - [ ] 🔧 **Refactoring / Code Cleanup** – Improves readability or maintainability without changing functionality. - [ ] 📝 **Documentation update** – Changes to `README`, `AppName.md`, `CONTRIBUTING.md`, or other docs. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2025-11-20 07:10:14 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/ProxmoxVE#6361