Skip to content

[Bug]: Windows Agent 8.23.1 test fails in certain directories #243

@sarhaynes

Description

@sarhaynes

Is this a critical security issue?

  • This is not a security issue.

Describe the Bug

When we attempt to run puppet agent --test from directories that are not under the \ProgramData\PuppetLabs... subdirectories the command fails attempting to convert the underlying directory from directory to a file. See attached screenshot. This issues occurs before the agent contacts the server and executes the downloaded manifests.
It was also noted that if we do not 'cd' to the directory using the proper case the call will also fail. This seems to indicate that puppet is not being case-insensitive in Windows.

Image

Expected Behavior

The puppet agent test should have run and should not attempt to make changes to the underlying directory that the command was called from.

Steps to Reproduce

Using an Administrative PowerShell from \Windows\System32 execute puppet agent --test.
The command will fail (NOTE: This was also tested in the current logged in Admin's Home Directory with no success).
Change to \ProgramData\PuppetLabs\code\ and execute the command and it will execute normally.

Environment

Version Windows Agent 8.23.1
Platform Windows 11 Pro 24H2, Windows Server 2022 DC

Additional Context

No response

Relevant log output

See attached screenshot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions