Skip to content

Commit

Permalink
(1password) refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
majkinetor authored Jun 7, 2019
1 parent 44e2107 commit f5f0e05
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions automatic/1password/tools/chocolateyInstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,16 @@ Start-Job -ScriptBlock { param($cache_dir)
$seconds = 0; $max_seconds = 600

while ($seconds -lt $max_seconds) {
sleep 1; $seconds++

$logFilePath = ls $cache_dir\*.log -Recurse | select -First 1
if (!$logFilePath) { sleep 1; $seconds++; continue }
if (!$logFilePath) { continue }

$log = Get-Content $logFilePath
if ($log -like '*Installation successful!') {
ps $env:ChocolateyPackageName -ea 0 | kill
exit
}
sleep 1
}
} -ArgumentList (Get-PackageCacheLocation)
Install-ChocolateyPackage @packageArgs

0 comments on commit f5f0e05

Please sign in to comment.