PowerShell / PowerShell/DSC

Exit codes not reliable

Open
#1,245 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue-Bug Need-Review
Dominant language
Rust
Stars
523
Forks
75
Avg merge
3d 16h
Merged PRs (30d)
24

Description

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

I'm using PowerShell to create a resource but the exit codes are not as expected. I get an exit code of 2, even if coded to 0 upon exit of pwsh.exe.

Here is the repo and the launch.json has the test cases... ; https://github.com/IlleNilsson/Microsoft.DSC.v3.resource.venture

Steps to reproduce

Run the test in the launch.json file

Expected behavior
0
Actual behavior
2
Error details

Environment data
7.5.4
Version

3.1.1

Visuals

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the test described in the external repository's launch.json with PowerShell 7.5.4 and DSC 3.1.1. Compare the reported pwsh.exe exit code with the expected 0 and inspect the repository's test configuration to identify where the value changes. Done means the reproduced case returns the expected exit code.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell, rust
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
40/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.