Skip to content

Commit

Permalink
Feature/script improvements (#419)
Browse files Browse the repository at this point in the history
* wip

* added scripts checking requisites

* script cleanup

* sync

* wip

---------

Co-authored-by: MTS\Tomas_K <tomas.kovac@mts.sk>
  • Loading branch information
TomKovac and MTS\Tomas_K authored Jul 17, 2024
1 parent 61257f5 commit c37fa4c
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions scripts/check_requisites.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,10 @@ if($isApaxInstalled){
# Check for apax
$isApaxAccessible = $false
try {
$errorOutput =""
$output =""
$command = "apax info --ax-scopes"
$resp = $(Invoke-Expression "$command" -OutVariable output -ErrorVariable errorOutput )
Write-Host "output $output" -ForegroundColor Red
Write-Host "errorOutput $errorOutput" -ForegroundColor Red
Write-Host "resp $resp" -ForegroundColor Red
if($errorOutput[1].ToString().Contains("No access to the Simatic-AX registry"))
$resp = cmd /c $command '2>&1'
Write-Host "resp $resp" -ForegroundColor Yellow
if($resp[2].ToString().Contains("No access to the Simatic-AX registry"))
{
Write-Host "Unable to access apax packages. Check your connections, firewall, credentials etc." -ForegroundColor Red
Write-Host "$errorOutput" -ForegroundColor Red
Expand Down

0 comments on commit c37fa4c

Please sign in to comment.