Skip to content

Commit

Permalink
Fix Windows Omnibus Install #811
Browse files Browse the repository at this point in the history
  • Loading branch information
dissonanz authored and snolen-align committed Oct 26, 2015
1 parent 5e4fa6b commit 438e3b8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions support/chef_base_install_command.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ Function Check-UpdateChef($root, $version) {
if (-Not (Test-Path $root)) { return $true }
elseif ("$version" -eq "true") { return $false }
elseif ("$version" -eq "latest") { return $true }
Try { $chef_version = Get-Content $root\version-manifest.txt | select-object -1}
Try { $chef_version = (Get-Content $root\version-manifest.txt | select-object -first 1) }
Catch {
Try { $chef_version = (& $root\bin\chef-solo.bat -v).split(" ", 2)[1] }
Catch { $chef_version = "" }
Try { $chef_version = (& $root\bin\chef-solo.bat -v) }
Catch { $chef_version = " " }
}

if ($chef_version.StartsWith($version)) { return $false }
if ($chef_version.split(" ", 2)[1].StartsWith($version)) { return $false }
else { return $true }
}

Expand Down

0 comments on commit 438e3b8

Please sign in to comment.