From 94b1f3fe37d39d119b8574a7ed103e825179a494 Mon Sep 17 00:00:00 2001 From: ririxi Date: Wed, 29 May 2024 18:10:07 +0300 Subject: [PATCH] chore(install): change wording for admin/root (#3051) --- install.ps1 | 12 ++++++------ install.sh | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/install.ps1 b/install.ps1 index 0fafdad7c2..cdd92c9dcc 100644 --- a/install.ps1 +++ b/install.ps1 @@ -27,7 +27,7 @@ function Test-Admin { [CmdletBinding()] param () begin { - Write-Host -Object "Checking if the script wasn't ran as Administrator..." -NoNewline + Write-Host -Object "Checking if the script is not being run as administrator..." -NoNewline } process { $currentUser = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent()) @@ -64,8 +64,8 @@ function Get-Spicetify { [CmdletBinding()] param () begin { - if ($env:PROCESSOR_ARCHITECTURE -eq 'AMD64') { - $architecture = 'x64' + if ($env:PROCESSOR_ARCHITECTURE -eq 'AMD64') { + $architecture = 'x64' } elseif ($env:PROCESSOR_ARCHITECTURE -eq 'ARM64') { $architecture = 'arm64' @@ -165,13 +165,13 @@ else { } if (-not (Test-Admin)) { Write-Unsuccess - Write-Warning -Message "The script was ran as Administrator which isn't recommended" + Write-Warning -Message "The script was run as administrator. This can result in problems with the installation process or unexpected behavior. Do not continue if you do not know what you are doing." $Host.UI.RawUI.Flushinputbuffer() $choices = [System.Management.Automation.Host.ChoiceDescription[]] @( (New-Object System.Management.Automation.Host.ChoiceDescription '&Yes', 'Abort installation.'), (New-Object System.Management.Automation.Host.ChoiceDescription '&No', 'Resume installation.') ) - $choice = $Host.UI.PromptForChoice('', 'Do you want to abort the installation process to avoid any issues?', $choices, 0) + $choice = $Host.UI.PromptForChoice('', 'Do you want to abort the installation process?', $choices, 0) if ($choice -eq 0) { Write-Host -Object 'spicetify installation aborted' -ForegroundColor 'Yellow' Pause @@ -197,7 +197,7 @@ $choices = [System.Management.Automation.Host.ChoiceDescription[]] @( (New-Object System.Management.Automation.Host.ChoiceDescription "&Yes", "Install Spicetify Marketplace."), (New-Object System.Management.Automation.Host.ChoiceDescription "&No", "Do not install Spicetify Marketplace.") ) -$choice = $Host.UI.PromptForChoice('', "`nDo you want to install Spicetify Marketplace?", $choices, 0) +$choice = $Host.UI.PromptForChoice('', "`nDo you also want to install Spicetify Marketplace? It will become available within the Spotify client, where you can easily install themes and extensions.", $choices, 0) if ($choice -eq 1) { Write-Host -Object 'spicetify Marketplace installation aborted' -ForegroundColor 'Yellow' } diff --git a/install.sh b/install.sh index 80cc106721..4d6c1221d1 100755 --- a/install.sh +++ b/install.sh @@ -24,9 +24,9 @@ is_root() { } if ! is_root && [ "${override_root:-0}" -eq 0 ]; then - echo "The script was ran as root. Script will now exit" - echo "If you did not intend to do this, please run the script without root permissions to avoid issues with Spicetify" - echo "You can override this behavior by passing '--root' flag to this script" + echo "The script was ran under sudo or as root. The script will now exit" + echo "If you hadn't intended to do this, please execute the script without root access to avoid problems with spicetify" + echo "To override this behavior, pass the '--root' parameter to this script" exit fi