Project

General

Profile

Actions

Bug #16817

closed

HereString are not generated properly

Added by Félix DALLIDET about 4 years ago. Updated about 4 years ago.

Status:
Released
Priority:
N/A
Category:
Web - Technique editor
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
Reviewed
Fix check:
To do
Regression:

Description

We can now define HereString type in the technique editor, but the resulting file is using ` ... ` instead of ' ... '

Moreover, when using one, on a windows node, it should not break line afterward.

What we currently have generated:

  $local_classes = Merge-ClassContext $local_classes $(Dsc-Report -Tag "Creating user bobouioui" -ResourceName "User" -ScriptBlock @`
$name = 'bobouioui'
$secpasswd = ConvertTo-SecureString 'PlainTextPassword' -AsPlainText -Force
$mycreds = New-Object System.Management.Automation.PSCredential ($Name, $secpasswd)
$Ensure = 'Present'
$UserName = $name
$Password = $mycreds
$table = @{}
$table.Add(`"Ensure`", $Ensure)
$table.Add(`"UserName`", $UserName)
$table.Add(`"Password`", $Password)
$table
`@
           -componentName "DSC resource" -reportId $reportId -techniqueName $techniqueName -auditOnly:$auditOnly).get_item("classes")

  $class = "linux" 

What we want:


  $local_classes = Merge-ClassContext $local_classes $(Dsc-Report -Tag "Creating user bobouioui" -ResourceName "User" -ScriptBlock @'
$name = 'bobouioui'
$secpasswd = ConvertTo-SecureString 'PlainTextPassword' -AsPlainText -Force
$mycreds = New-Object System.Management.Automation.PSCredential ($Name, $secpasswd)
$Ensure = 'Present'
$UserName = $name
$Password = $mycreds
$table = @{}
$table.Add("Ensure", $Ensure)
$table.Add("UserName", $UserName)
$table.Add("Password", $Password)
$table
'@ -componentName "DSC resource" -reportId $reportId -techniqueName $techniqueName -auditOnly:$auditOnly).get_item("classes")

  $class = "linux" 


Subtasks 1 (0 open1 closed)

Bug #16823: HereString wrongly escape " charReleasedFélix DALLIDETActions
Actions

Also available in: Atom PDF