Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dezren39 committed Mar 8, 2024
1 parent 226dc52 commit d546019
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
8 changes: 6 additions & 2 deletions sources/identity/build-libsql.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,16 @@ try {
if (-not $SkipBuildTempl) {

Install-Templ -Force:$ForceInstallTempl
$goBinPath = Join-Path (go env GOPATH) "bin"
Write-Verbose "goBinPath: $goBinPath"
$templCommand = Join-Path $goBinPath "templ"
Write-Verbose "templCommand: $templCommand"

Write-Verbose "templ fmt"
templ fmt .
."$templCommand" fmt .

Write-Verbose "templ generate"
$generateOutput = templ generate
$generateOutput = ."$templCommand" generate
Write-Verbose "templ generate output:"
$generateOutput -split "`n" | ForEach-Object { Write-Verbose ($_ -replace "\(Γ£ù\)", "" -replace "\(Γ£ô\)", "") }

Expand Down
12 changes: 5 additions & 7 deletions sources/identity/import-lib.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ try {
param(
[switch]$Force
)
$templCommand = "templ"
$goBinPath = Join-Path (go env GOPATH) "bin"
Write-Verbose "goBinPath: $goBinPath"

$templCommand = Join-Path $goBinPath "templ"
Write-Verbose "templCommand: $templCommand"

try {
$output = & $templCommand --version
Expand All @@ -51,12 +55,6 @@ try {
Write-Verbose "go install github.com/a-h/templ/cmd/templ@latest"
go install github.com/a-h/templ/cmd/templ@latest

$goBinPath = Join-Path (go env GOPATH) "bin"
if (-Not $goBinPath) {
$goBinPath = go env GOBIN
}
Write-Verbose "goBinPath: $goBinPath"

if (-Not ($env:PATH -split ';' -contains $goBinPath)) {
Write-Verbose "Adding Go bin path to the current session PATH..."
$env:PATH += ";$goBinPath"
Expand Down

0 comments on commit d546019

Please sign in to comment.