Fix: Resolve readonly variable conflict in system detection
This commit is contained in:
parent
e730790783
commit
804a25979e
2 changed files with 7 additions and 4 deletions
|
|
@ -183,6 +183,7 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
|
||||||
|
|
||||||
## 🙏 Acknowledgments
|
## 🙏 Acknowledgments
|
||||||
|
|
||||||
|
- Thank you to Daniel Miessler for building and open-sourcing PAI (https://github.com/danielmiessler/PAI)
|
||||||
- Built for modern Linux productivity workflows
|
- Built for modern Linux productivity workflows
|
||||||
- Inspired by the need for consistent, reproducible development environments
|
- Inspired by the need for consistent, reproducible development environments
|
||||||
- Integrates the best modern CLI tools available
|
- Integrates the best modern CLI tools available
|
||||||
|
|
|
||||||
8
fresh.sh
8
fresh.sh
|
|
@ -119,9 +119,11 @@ detect_system() {
|
||||||
log "Detecting system information..."
|
log "Detecting system information..."
|
||||||
|
|
||||||
if [[ -f /etc/os-release ]]; then
|
if [[ -f /etc/os-release ]]; then
|
||||||
source /etc/os-release
|
# Read OS info safely without sourcing to avoid readonly variable conflicts
|
||||||
echo "OS: $PRETTY_NAME"
|
local os_name=$(grep '^PRETTY_NAME=' /etc/os-release | cut -d'"' -f2)
|
||||||
echo "Version: $VERSION_ID"
|
local os_version=$(grep '^VERSION_ID=' /etc/os-release | cut -d'"' -f2)
|
||||||
|
echo "OS: ${os_name:-Unknown}"
|
||||||
|
echo "Version: ${os_version:-Unknown}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Architecture: $(uname -m)"
|
echo "Architecture: $(uname -m)"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue