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

Better error message when no input is provided to PowerShell adapters #516

Closed
3 tasks done
Gijsreyn opened this issue Aug 7, 2024 · 2 comments · Fixed by #525
Closed
3 tasks done

Better error message when no input is provided to PowerShell adapters #516

Gijsreyn opened this issue Aug 7, 2024 · 2 comments · Fixed by #525
Labels
Issue-Bug Something isn't working Need-Review

Comments

@Gijsreyn
Copy link
Contributor

Gijsreyn commented Aug 7, 2024

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest version
  • Search the existing issues.

Summary

Executing: dsc resource get --resource Microsoft.DSC/PowerShell throws an error "Exception calling "Invoke" with "2" argument(s): "Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path '', line 0"

Steps to reproduce

dsc resource get --resource Microsoft.DSC/PowerShell

Expected behavior

Message indicating the issue.

Actual behavior

Exception calling "Invoke" with "2" argument(s): "Conversion from JSON failed with error: Unexpected character encountered while parsing value: @. Path '', line 0

Error details

No response

Environment data

Name                           Value
----                           -----
PSVersion                      7.4.3
PSEdition                      Core
GitCommitId                    7.4.3
OS                             Microsoft Windows 10.0.22631
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Version

dsc 3.0.0-preview.8

Visuals

No response

@Gijsreyn Gijsreyn added Issue-Bug Something isn't working Need-Review labels Aug 7, 2024
Gijsreyn pushed a commit to Gijsreyn/operation-methods that referenced this issue Aug 7, 2024
@anmenaga
Copy link
Contributor

anmenaga commented Aug 8, 2024

This should be fixed in dsc RUST engine like "non-List operations on adapters should be blocked and result in error".

@Gijsreyn
Copy link
Contributor Author

Gijsreyn commented Aug 8, 2024

Then my review can be closed and PR can be abandoned. Thanks for checking out the issue Andrew.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug Something isn't working Need-Review
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants