Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-6302

stdlib dirname does not understand Windows paths

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Won't Do
    • Affects Version/s: PUP 3.8.5
    • Fix Version/s: None
    • Component/s: Modules
    • Labels:
      None
    • Environment:

      stdlib 4.12
      Windows 7 client, Puppet 3.8.6
      Debian 7 Wheezy server, Puppet 3.8.5

    • Template:

      Description

      dirname does not remove the last part of Windows paths:

      In the example below dirname(C:\Windows\system32) is '.' . I think the output should be "C:\Windows"

      notify

      { "\$::system32 $::system32" : }

      $dirname32 = dirname($::system32)
      notify

      { "\$dirname32 $dirname32" : }

      Output.

      Notice: $dirname32 .
      Notice: /Stage[main]/Winnodes/Notify[$dirname32 .]/message: defined 'message' as
      '$dirname32 .'
      Notice: $::system32 C:\Windows\system32
      Notice: /Stage[main]/Winnodes/Notify[$::system32 C:\Windows\system32]/message: d
      efined 'message' as '$::system32 C:\Windows\system32'
      Notice: Finished catalog run in 0.21 seconds

      Thanks!
      C.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            cwseys c sights
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support