This repository has been archived by the owner on Jan 16, 2021. It is now read-only.
Connect-ServiceFabricCluster / Publish-NewServiceFabricApplication / etc depend on magic global variable $clusterConnection #137
Labels
Wrote automated Service Fabric app deployment (cluster + app), publishing SF app looks like this:
Apparently, this will work if ran from interactive PS session and never work if called from a PowerShell function, even if you retry it forever. The reason?
Because this
Connect-ServiceFabricCluster
defines a variable$clusterConnection
which is then expected to be accessible in current scope. In case of a function, it just won't be, since it's declared as local variable.Work around would be
To manually global it
The text was updated successfully, but these errors were encountered: