Jira (FACT-1793) Facter incorrectly outputs backslash characters in default output
Title: Message Title Josh Cooper commented on FACT-1793 Re: Facter incorrectly outputs backslash characters in default output Facter 4 is has the same bug (which is intentional to produce the same output as Facter 3). See https://github.com/puppetlabs/facter/blob/80c9f0281e95123e357164867569e19460fc9ba7/lib/facter/framework/formatters/legacy_fact_formatter.rb#L71-L72 Add Comment This message was sent by Atlassian Jira (v8.20.2#820002-sha1:829506d) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.220280.1509652938000.21766.1642137120039%40Atlassian.JIRA.
Jira (FACT-1793) Facter incorrectly outputs backslash characters in default output
Title: Message Title Branan Riley updated an issue Facter / FACT-1793 Facter incorrectly outputs backslash characters in default output Change By: Branan Riley Labels: cli triaged Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (FACT-1793) Facter incorrectly outputs backslash characters in default output
Title: Message Title Glenn Sarti commented on FACT-1793 Re: Facter incorrectly outputs backslash characters in default output Ha yeah...It threw me as well. Add Comment This message was sent by Atlassian JIRA (v7.0.2#70111-sha1:88534db) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (FACT-1793) Facter incorrectly outputs backslash characters in default output
Title: Message Title Branan Riley updated an issue Facter / FACT-1793 Facter incorrectly outputs backslash characters in default output Change By: Branan Riley Team: Platform OS Add Comment This message was sent by Atlassian JIRA (v7.0.2#70111-sha1:88534db) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (FACT-1793) Facter incorrectly outputs backslash characters in default output
Title: Message Title Branan Riley commented on FACT-1793 Re: Facter incorrectly outputs backslash characters in default output Yeah. The "rubyish" output is probably worth us manually adding escaping to. I totally thought that was the JSON output when I went through this the first time, sorry! Add Comment This message was sent by Atlassian JIRA (v7.0.2#70111-sha1:88534db) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (FACT-1793) Facter incorrectly outputs backslash characters in default output
Title: Message Title Glenn Sarti commented on FACT-1793 Re: Facter incorrectly outputs backslash characters in default output JSON definitely does. backslash is the escape character. YAML seems to be Looks like single quoted strings no, double quoted strings yes. http://yaml.org/spec/history/2001-08-01.html "YAML's quoted strings are similar to C's. In YAML, text scalars can be surrounded by quotes enabling escape sequences such as \n to represent a new line, \t to represent a tab, and to represent the backslash. Unlike C, since line break is folded into a space, a trailing \ is used as a continuation marker, allowing content to be broken into multiple lines without introducing unwanted whitespace. Further, YAML treats an empty line (two consecutive line breaks) as being equivalent to \n. Lastly, 8-bit (ISO 8859-1) characters can be specified using "\x3B" style escapes, 16-bit (Unicode) characters can be specified using "\u003B" style escapes, and 32-bit (ISO/IEC 10646) characters can be specified using "\U003B" style escapes." Add Comment This message was sent by Atlassian JIRA (v7.0.2#70111-sha1:88534db) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (FACT-1793) Facter incorrectly outputs backslash characters in default output
Title: Message Title Glenn Sarti commented on FACT-1793 Re: Facter incorrectly outputs backslash characters in default output However the facter output is supposed to be rubyish AFAIK. Add Comment This message was sent by Atlassian JIRA (v7.0.2#70111-sha1:88534db) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (FACT-1793) Facter incorrectly outputs backslash characters in default output
Title: Message Title Branan Riley commented on FACT-1793 Re: Facter incorrectly outputs backslash characters in default output Do YAML or JSON require escaping of backslashes? If so, this is a bug in the libraries we use to output those formats (which we can and should totally work around if needed). If those formats do not require escaping, then I'd say this is expected behavior - Ruby eats the escape, so the string that is output matches "what you put in" Add Comment This message was sent by Atlassian JIRA (v7.0.2#70111-sha1:88534db) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (FACT-1793) Facter incorrectly outputs backslash characters in default output
Title: Message Title Glenn Sarti updated an issue Facter / FACT-1793 Facter incorrectly outputs backslash characters in default output Change By: Glenn Sarti When using a simple custom fact of {code}Facter.add(:sqlserver_instances) do setcode do {"sqlserver_instances" => { "SQL_2012" => {}, "SQL_2014"=> {}, "SQL_2016"=> {"MSSQLSERVER" => { "name" => "MSSQLSERVER", "version_friendly" => "SQL_2016", "version" => "13.1.4001.0", "reg_root" => "Software\\Microsoft\\Microsoft SQL Server\\MSSQL13.MSSQLSERVER", "features" => ["SQLEngine" ]} }}} endend{code}Running facter outputs text which does not seem to have the correct backslash escaping{code}Change FACTERLIBPS C:\source\sqlserver> facter sqlserver_instances { sqlserver_instances => { SQL_2012 => {}, SQL_2014 => {}, SQL_2016 => { MSSQLSERVER => { name => "MSSQLSERVER", version_friendly => "SQL_2016", version => "13.1.4001.0", reg_root => "Software\Microsoft\Microsoft SQL Server\MSSQL13.MSSQLSERVER", <- These backslashes should be escaped. features => [ "SQLEngine" ] } } } } {code}{code}Using Puppet Facts "sqlserver_instances": { "sqlserver_instances": {"SQL_2012": {},"SQL_2014": {},"SQL_2016": { "MSSQLSERVER": {"name": "MSSQLSERVER","version_friendly": "SQL_2016","version": "13.1.4001.0","reg_root": "Software\\Microsoft\\Microsoft SQL Server\\MSSQL13.MSSQLSERVER","features": [ "SQLEngine"] }} }},{code}{code}Outputing in YAML formatsqlserver_instances: sqlserver_instances:SQL_2012: {}
Jira (FACT-1793) Facter incorrectly outputs backslash characters in default output
Title: Message Title Glenn Sarti updated an issue Facter / FACT-1793 Facter incorrectly outputs backslash characters in default output Change By: Glenn Sarti Summary: Facter incorrectly parses outputs backslash characters in default output Add Comment This message was sent by Atlassian JIRA (v7.0.2#70111-sha1:88534db) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.