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

msi_full_path not translated to value in windows.pp #814

Open
shbakesas opened this issue Aug 30, 2024 · 0 comments
Open

msi_full_path not translated to value in windows.pp #814

shbakesas opened this issue Aug 30, 2024 · 0 comments

Comments

@shbakesas
Copy link

shbakesas commented Aug 30, 2024

Line 51 of windows.pp has:

    $fileStream = [system.io.file]::openread('${msi_full_path}');

This is causing the assertion to fail because '${msi_full_path}' is being sent as the actual string instead of the value of the variable. Since $msi_full_path is not defined on the local OS, the assertion fails:

Debug: /Stage[main]/Datadog_agent::Windows/Exec[assert-acceptable-msi]/unless: Exception calling "OpenRead" with "1" argument(s): "Could not find file 'C:\Windows\system32\${msi_full_path}'."

This line should be updated to use double-quotes instead of single-quotes.
$fileStream = [system.io.file]::openread("${msi_full_path}");

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

No branches or pull requests

1 participant