Skip to content

regions with here-strings do not fold #525

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
michaelburch opened this issue Mar 9, 2017 · 1 comment
Closed

regions with here-strings do not fold #525

michaelburch opened this issue Mar 9, 2017 · 1 comment

Comments

@michaelburch
Copy link

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'

nxScript registerBlueprint
{
    SetScript = @'

#!/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

  • Operating system name and version: Windows 10 Pro 1607
  • VS Code version: 1.10.2
  • PowerShell extension version: 0.9.0
  • Output from $PSVersionTable:
PSVersion                      5.1.14393.693
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14393.693
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Issue Description

regions with here-strings do not fold

Attached Logs

Follow the instructions in the README
about capturing and sending logs.

@rkeithhill
Copy link
Contributor

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants