Skip to content

Commit 94b1f3f

Browse files
authored
chore(install): change wording for admin/root (#3051)
1 parent 5760cfc commit 94b1f3f

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

install.ps1

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function Test-Admin {
2727
[CmdletBinding()]
2828
param ()
2929
begin {
30-
Write-Host -Object "Checking if the script wasn't ran as Administrator..." -NoNewline
30+
Write-Host -Object "Checking if the script is not being run as administrator..." -NoNewline
3131
}
3232
process {
3333
$currentUser = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())
@@ -64,8 +64,8 @@ function Get-Spicetify {
6464
[CmdletBinding()]
6565
param ()
6666
begin {
67-
if ($env:PROCESSOR_ARCHITECTURE -eq 'AMD64') {
68-
$architecture = 'x64'
67+
if ($env:PROCESSOR_ARCHITECTURE -eq 'AMD64') {
68+
$architecture = 'x64'
6969
}
7070
elseif ($env:PROCESSOR_ARCHITECTURE -eq 'ARM64') {
7171
$architecture = 'arm64'
@@ -165,13 +165,13 @@ else {
165165
}
166166
if (-not (Test-Admin)) {
167167
Write-Unsuccess
168-
Write-Warning -Message "The script was ran as Administrator which isn't recommended"
168+
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."
169169
$Host.UI.RawUI.Flushinputbuffer()
170170
$choices = [System.Management.Automation.Host.ChoiceDescription[]] @(
171171
(New-Object System.Management.Automation.Host.ChoiceDescription '&Yes', 'Abort installation.'),
172172
(New-Object System.Management.Automation.Host.ChoiceDescription '&No', 'Resume installation.')
173173
)
174-
$choice = $Host.UI.PromptForChoice('', 'Do you want to abort the installation process to avoid any issues?', $choices, 0)
174+
$choice = $Host.UI.PromptForChoice('', 'Do you want to abort the installation process?', $choices, 0)
175175
if ($choice -eq 0) {
176176
Write-Host -Object 'spicetify installation aborted' -ForegroundColor 'Yellow'
177177
Pause
@@ -197,7 +197,7 @@ $choices = [System.Management.Automation.Host.ChoiceDescription[]] @(
197197
(New-Object System.Management.Automation.Host.ChoiceDescription "&Yes", "Install Spicetify Marketplace."),
198198
(New-Object System.Management.Automation.Host.ChoiceDescription "&No", "Do not install Spicetify Marketplace.")
199199
)
200-
$choice = $Host.UI.PromptForChoice('', "`nDo you want to install Spicetify Marketplace?", $choices, 0)
200+
$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)
201201
if ($choice -eq 1) {
202202
Write-Host -Object 'spicetify Marketplace installation aborted' -ForegroundColor 'Yellow'
203203
}

install.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ is_root() {
2424
}
2525

2626
if ! is_root && [ "${override_root:-0}" -eq 0 ]; then
27-
echo "The script was ran as root. Script will now exit"
28-
echo "If you did not intend to do this, please run the script without root permissions to avoid issues with Spicetify"
29-
echo "You can override this behavior by passing '--root' flag to this script"
27+
echo "The script was ran under sudo or as root. The script will now exit"
28+
echo "If you hadn't intended to do this, please execute the script without root access to avoid problems with spicetify"
29+
echo "To override this behavior, pass the '--root' parameter to this script"
3030
exit
3131
fi
3232

0 commit comments

Comments
 (0)