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 when no input is provided to test on a resource #484

Closed
3 tasks done
SteveL-MSFT opened this issue Jul 8, 2024 · 0 comments · Fixed by #504
Closed
3 tasks done

Better error when no input is provided to test on a resource #484

SteveL-MSFT opened this issue Jul 8, 2024 · 0 comments · Fixed by #504
Assignees
Labels
Issue-Bug Something isn't working Need-Review
Milestone

Comments

@SteveL-MSFT
Copy link
Member

Prerequisites

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

Summary

When invoking test directly on a resource, the desired state is required to compare againt. When not provided, dsc tries to read the input from STDIN and complains about the input being end-of-file.

Steps to reproduce

dsc resource test -r microsoft/osinfo

Expected behavior

An error messages that `test` requires input either via STDIN, `-i` or `-p`

Actual behavior

2024-07-08T11:46:41.398985Z ERROR Error: JSON: EOF while parsing a value at line 1 column 0

Error details

The current error is from reading STDIN and it's not provided, so the error isn't useful to the user to figure out what went wrong

Environment data

Name                           Value
----                           -----
PSVersion                      7.5.0-preview.3
PSEdition                      Core
GitCommitId                    7.5.0-preview.3
OS                             Darwin 23.5.0 Darwin Kernel Version 23.5.0: Wed May  1 20:16:51 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T8103
Platform                       Unix
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

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.

1 participant