Fix logs on windows

This commit is contained in:
Shivam Mathur 2019-10-23 15:27:40 +05:30
parent 75c0e130e8
commit 340ab0b95f
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A

View File

@ -6,12 +6,12 @@ $tick = ([char]8730)
$cross = ([char]10007) $cross = ([char]10007)
Function Step-Log($message) { Function Step-Log($message) {
printf "\n\033[90;1m==> \033[0m\033[37;1m%s \033[0m" $message printf "\n\033[90;1m==> \033[0m\033[37;1m%s \033[0m\n" $message
} }
Function Add-Log($mark, $subject, $message) { Function Add-Log($mark, $subject, $message) {
$code = if($mark -eq $cross) {"31"} else {"32"} $code = if($mark -eq $cross) {"31"} else {"32"}
printf "\033[%s;1m%s \033[0m\033[34;1m%s \033[0m\033[90;1m%s \033[0m" $code $mark $subject $message printf "\033[%s;1m%s \033[0m\033[34;1m%s \033[0m\033[90;1m%s \033[0m\n" $code $mark $subject $message
} }
if($version -eq '7.4') { if($version -eq '7.4') {
@ -20,7 +20,6 @@ if($version -eq '7.4') {
Step-Log "Setup PhpManager" Step-Log "Setup PhpManager"
Install-Module -Name PhpManager -Force -Scope CurrentUser Install-Module -Name PhpManager -Force -Scope CurrentUser
printf "\n"
Add-Log $tick "PhpManager" "Installed" Add-Log $tick "PhpManager" "Installed"
$installed = $($(php -v)[0] -join '')[4..6] -join '' $installed = $($(php -v)[0] -join '')[4..6] -join ''