Issue #23249 has been updated by Josh Cooper. Keywords set to windows
---------------------------------------- Bug #23249: Tidy causes 'Cannot alias' ArgumentError exception on Windows https://projects.puppetlabs.com/issues/23249#change-101236 * Author: C Lang * Status: In Topic Branch Pending Review * Priority: Normal * Assignee: * Category: tidy * Target version: 3.5.0 * Affected Puppet version: 2.7.23 * Keywords: windows * Branch: https://github.com/puppetlabs/puppet/pull/2141 ---------------------------------------- This example: <pre> class puppet-bug { file { 'C:\bug': ensure => directory, } tidy { 'C:\bug': recurse => true, backup => false } file { 'C:\bug\test.txt': content => 'Look, a bug!' } } </pre> Causes this error: <pre> err: Got an uncaught exception of type ArgumentError: Cannot alias File[C:\bug/test.txt] to ["C:/bug/test.txt"]; resource ["File", "C:/bug/test.txt"] already declared at /etc/puppet/modules/puppet-bug/manifests/init.pp:14 </pre> It appears to be due to the way slashes are handled on Windows. If you change the tidy to 'C:/bug' it all works just fine and the duplicate resource is detected and excluded from the tidy as expected. That might be an acceptable fix, except when you're using variables for File resources that are also used as msiexec parameters and thus can't have Unix slashes. :) -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- 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 http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/groups/opt_out.