init: workspace opencode sync
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
param(
|
||||
[Parameter(Mandatory = $true, Position = 0)]
|
||||
[string]$Command
|
||||
)
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
$SessionFile = Join-Path (Join-Path $env:LOCALAPPDATA 'bw-cli') 'session.txt'
|
||||
if (Test-Path $SessionFile) {
|
||||
$env:BW_SESSION = (Get-Content $SessionFile -Raw).Trim()
|
||||
}
|
||||
if (-not $env:BW_SESSION) {
|
||||
Write-Error 'Session tidak ada. Jalankan ./bw-auth.ps1 dulu'
|
||||
}
|
||||
|
||||
bw $Command.Split(' ') | Out-String
|
||||
Reference in New Issue
Block a user