Skip to content

"Format on type" does not work with unless clauses #895

Open
@djmills64

Description

@djmills64

What Versions are you running?

OS Version: Ubuntu 22.04
VSCode Version: 1.90.2
Puppet Extension Version: v1.5.3
PDK Version: 3.2.0

What You Are Seeing?

If I have

        exec { "${username} ${group}":
          command  => "usermod -a -G ${group} ${username}",
          logoutput => true,
          path => ['/usr/local/sbin', '/usr/bin', '/usr/sbin', '/sbin', '/bin'],
          unless => "getent group ${group} | grep ${username}",
        }

and remove and retype any of the '=>' instances - except the unless one - then the resource reformats - again except the unless clause. The result is:

        exec { "${username} ${group}":
          command   => "usermod -a -G ${group} ${username}",
          logoutput => true,
          path      => ['/usr/local/sbin', '/usr/bin', '/usr/sbin', '/sbin', '/bin'],
          unless => "getent group ${group} | grep ${username}",
        }

What is Expected?

How Did You Get This To Happen? (Steps to Reproduce)

As described above

Output Log

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions