You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is nothing we can do about this in the PowerShell extension at this time. Code folding is completely controlled by VSCode and is based purely on indentation which as you've observed, doesn't work with PowerShell here strings. I suggest you +1 this issue on the VSCode issue - Microsoft/vscode#3422 (comment)
The region folds everything except the here-string. This same code folds correctly in ISE
#region AmbariHostGroup specific
if ($HostGroup -eq 'Ambari') {
nxPackage ambariServer
{
Name = "ambari-server"
Ensure = "Present"
PackageManager = $packageManager
DependsOn = @('[nxScript]ambariRepo','[nxEnvironment]javaHome','[nxPackage]ambariAgent')
}
$cfsignalDeps += '[nxScript]registerBlueprint'
#!/bin/bash
BLUEPRINT_NAME=$(awk -F "=" '/BLUEPRINT_NAME/ {print $2}' /etc/profile.d/rptenv.sh)
logger "[DSC]: Registering Blueprint"
Register Blueprint
curl -H "X-Requested-By: ambari" -X POST -u admin:admin http://127.0.0.1:8080/api/v1/blueprints/$BLUEPRINT_NAME -d @/tmp/ambariBlueprint.json
'@
TestScript = @"
#!/bin/bash
exit 1
"@
GetScript = @"
#!/bin/bash
"@
DependsOn = @('[nxScript]installAmbariServer','[nxEnvironment]javaHome')
}
#endregion
System Details
$PSVersionTable
:Issue Description
regions with here-strings do not fold
Attached Logs
Follow the instructions in the README
about capturing and sending logs.
The text was updated successfully, but these errors were encountered: