Skip to content

Conversation

@MickLesk
Copy link
Member

@MickLesk MickLesk commented Jan 6, 2026

✍️ Description

Parameter expansion ${filename%.conf} instead of sed pipe - syntax error fixed

🔗 Related Issue

Fixes #10595

✅ Prerequisites (X in brackets)

  • Self-review completed – Code follows project standards.
  • Tested thoroughly – Changes work as expected.
  • 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.

The array assignment was using an invalid pipe construct inside the loop:
  vmids+=("${conf##*/}" | sed 's/\.conf$//')

This caused a bash syntax error:
  syntax error near unexpected token '2'

Fixed by using:
- shopt -s nullglob to handle empty directories gracefully
- Parameter expansion ${filename%.conf} instead of sed pipe

Fixes #10595
The array assignment was using an invalid pipe construct inside the loop:
  vmids+=("${conf##*/}" | sed 's/\.conf$//')

This caused a bash syntax error:
  syntax error near unexpected token '2'

Fixed by using parameter expansion ${basename%.conf} instead of sed pipe.

Fixes #10595
@CrazyWolf13 CrazyWolf13 merged commit d432d98 into main Jan 6, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PVE LXC Tag script error

4 participants