mirror of
https://github.com/ScoopInstaller/Scoop.git
synced 2026-08-28 09:06:46 +00:00
better colored messages, to work well with Solarized imported with consp
This commit is contained in:
+1
-1
@@ -17,7 +17,7 @@ if("$path" -like "$abs_shimdir*") {
|
||||
$shimtext = gc $path
|
||||
$shimtext | sls '(?m)^\$path = ''([^'']+)''' | % { $_.matches[0].groups[1].value }
|
||||
} else {
|
||||
warn "(non-scoop) $path" -f yellow -nonewline
|
||||
warn "(non-scoop) $path" -f darkyellow -nonewline
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -10,9 +10,9 @@ function format($str, $hash) {
|
||||
}
|
||||
|
||||
# messages
|
||||
function abort($msg) { write-host $msg -b darkred -f white; exit 1 }
|
||||
function warn($msg) { write-host $msg -f yellow; }
|
||||
function success($msg) { write-host $msg -b green -f black; }
|
||||
function abort($msg) { write-host $msg -f darkred; exit 1 }
|
||||
function warn($msg) { write-host $msg -f darkyellow; }
|
||||
function success($msg) { write-host $msg -f darkgreen }
|
||||
|
||||
# apps
|
||||
function appdir($app) { "$scoopdir\apps\$app" }
|
||||
|
||||
+1
-1
@@ -112,7 +112,7 @@ function run($exe, $arg, $msg, $continue_exit_codes) {
|
||||
write-host "exit code was $($proc.exitcode)"; return $false
|
||||
}
|
||||
} catch {
|
||||
write-host -f red $_.exception.tostring()
|
||||
write-host -f darkred $_.exception.tostring()
|
||||
return $false
|
||||
}
|
||||
write-host "done"
|
||||
|
||||
+2
-2
@@ -15,7 +15,7 @@ $append = "set shell=powershell.exe"
|
||||
$append | out-file $dst -append -encoding ascii
|
||||
|
||||
if((gc $dst)[-1] -eq $append) {
|
||||
write-host "ok" -f green
|
||||
write-host "ok" -f darkgreen
|
||||
} else {
|
||||
write-host ((gc $dst) | select -last 3) -f red
|
||||
write-host ((gc $dst) | select -last 3) -f darkred
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user