Skip to content

Commit efb3338

Browse files
committed
powershell formatting
1 parent 3859f6f commit efb3338

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

scripts/build.ps1

+6-4
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
.LINK
3636
http://cmder.app/ - Project Home
3737
#>
38-
[CmdletBinding(SupportsShouldProcess=$true)]
38+
[CmdletBinding(SupportsShouldProcess = $true)]
3939
Param(
4040
# CmdletBinding will give us;
4141
# -verbose switch to turn on logging and
@@ -108,12 +108,14 @@ if (-Not $noVendor) {
108108
$ConEmuXmlSave = Join-Path $config "ConEmu.xml"
109109
Write-Verbose "Backup '$ConEmuXml' to '$ConEmuXmlSave'"
110110
Copy-Item $ConEmuXml $ConEmuXmlSave
111-
} else { $ConEmuXml = "" }
112-
} else { $ConEmuXml = "" }
111+
}
112+
else { $ConEmuXml = "" }
113+
}
114+
else { $ConEmuXml = "" }
113115

114116
# Kill ssh-agent.exe if it is running from the $env:cmder_root we are building
115117
foreach ($ssh_agent in $(Get-Process ssh-agent -ErrorAction SilentlyContinue)) {
116-
if ([string]$($ssh_agent.path) -Match [string]$cmder_root.replace('\','\\')) {
118+
if ([string]$($ssh_agent.path) -Match [string]$cmder_root.replace('\', '\\')) {
117119
Write-Verbose $("Stopping " + $ssh_agent.path + "!")
118120
Stop-Process $ssh_agent.id
119121
}

scripts/pack.ps1

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
https://github.com/cmderdev/cmder - Project Home
2323
#>
2424

25-
[CmdletBinding(SupportsShouldProcess=$true)]
25+
[CmdletBinding(SupportsShouldProcess = $true)]
2626
Param(
2727
# CmdletBinding will give us;
2828
# -verbose switch to turn on logging and
@@ -42,8 +42,8 @@ $ErrorActionPreference = "Stop"
4242
Ensure-Executable "7z"
4343

4444
$targets = @{
45-
"cmder.7z" = "-t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -myx=7 -mqs=on";
46-
"cmder.zip" = "-mm=Deflate -mfb=128 -mpass=3";
45+
"cmder.7z" = "-t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -myx=7 -mqs=on";
46+
"cmder.zip" = "-mm=Deflate -mfb=128 -mpass=3";
4747
"cmder_mini.zip" = "-xr!`"vendor\git-for-windows`"";
4848
}
4949

@@ -63,7 +63,7 @@ $version = Get-VersionStr
6363

6464
if ($PSCmdlet.MyInvocation.BoundParameters["Verbose"].IsPresent) {
6565
Write-Verbose "Packing Cmder $version in $saveTo..."
66-
$excluded = (Get-Content -Path "$cmderRoot\packignore") -Split [System.Environment]::NewLine | Where-Object {$_}
66+
$excluded = (Get-Content -Path "$cmderRoot\packignore") -Split [System.Environment]::NewLine | Where-Object { $_ }
6767
Get-ChildItem $cmderRoot -Force -Exclude $excluded
6868
}
6969

scripts/update.ps1

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
.LINK
2626
http://cmder.app/ - Project Home
2727
#>
28-
[CmdletBinding(SupportsShouldProcess=$true)]
28+
[CmdletBinding(SupportsShouldProcess = $true)]
2929
Param(
3030
# CmdletBinding will give us;
3131
# -verbose switch to turn on logging and
@@ -158,10 +158,10 @@ function Fetch-DownloadUrl {
158158

159159
# Special case for archive downloads of repository
160160
if (($null -eq $downloadLinks) -Or (-Not $downloadLinks)) {
161-
if ((($p | % {$_.Trim('/')}) -Contains "archive") -And $info[0].tag_name) {
161+
if ((($p | % { $_.Trim('/') }) -Contains "archive") -And $info[0].tag_name) {
162162
for ($i = 0; $i -lt $p.Length; $i++) {
163163
if ($p[$i].Trim('/') -eq "archive") {
164-
$p[$i+1] = $info[0].tag_name + ".zip"
164+
$p[$i + 1] = $info[0].tag_name + ".zip"
165165
$downloadLinks = $url.Scheme + "://" + $url.Host + ($p -Join '')
166166
return $downloadLinks
167167
}

0 commit comments

Comments
 (0)