Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
djmills64 opened this issue Jun 24, 2024 · 0 comments
Open

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

djmills64 opened this issue Jun 24, 2024 · 0 comments

Comments

@djmills64
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants