Project

General

Profile

Actions

Bug #16817

closed

HereString are not generated properly

Added by Félix DALLIDET over 4 years ago. Updated over 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 #1

Updated by Vincent MEMBRÉ over 4 years ago

  • Status changed from New to In progress
  • Assignee set to Vincent MEMBRÉ
Actions #2

Updated by Vincent MEMBRÉ over 4 years ago

  • Assignee changed from Vincent MEMBRÉ to François ARMAND
  • Pull Request set to https://github.com/Normation/rudder/pull/2794
Actions #3

Updated by Vincent MEMBRÉ over 4 years ago

  • Status changed from In progress to Pending release
Actions #4

Updated by Vincent MEMBRÉ over 4 years ago

  • Target version changed from 6.0.4 to 6.0.3
Actions #5

Updated by Alexis Mousset over 4 years ago

  • Name check changed from To do to Reviewed
Actions #6

Updated by Vincent MEMBRÉ over 4 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 6.0.3 which was released today.

Actions

Also available in: Atom PDF