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

194 expand shell command to return exit code and stderr #209

Merged

Conversation

hulto
Copy link
Collaborator

@hulto hulto commented Jun 13, 2023

What type of PR is this?

/kind cleanup
/kind documentation

What this PR does / why we need it:

Adds stderr and status code to the output of exec and shell to provide better insight into run tasks.
The result is returned as a dictionary:

{
    "stdout":"root\n",
    "stderr":"",
    "status":0,
}

Which issue(s) this PR fixes:

Fixes #194

@hulto hulto linked an issue Jun 13, 2023 that may be closed by this pull request
@hulto hulto added cleanup Code cleanup and tech debt removal api-change eldritch Related to the Eldritch language labels Jun 13, 2023
@codecov
Copy link

codecov bot commented Jun 13, 2023

Codecov Report

Merging #209 (9a1a0fa) into main (26ff8be) will decrease coverage by 0.08%.
The diff coverage is 85.48%.

@@            Coverage Diff             @@
##             main     #209      +/-   ##
==========================================
- Coverage   72.42%   72.35%   -0.08%     
==========================================
  Files          82       82              
  Lines        4617     4666      +49     
==========================================
+ Hits         3344     3376      +32     
- Misses       1188     1205      +17     
  Partials       85       85              
Impacted Files Coverage Δ
implants/eldritch/src/sys/exec_impl.rs 83.01% <62.50%> (-13.41%) ⬇️
implants/eldritch/src/sys/shell_impl.rs 95.78% <96.15%> (-1.27%) ⬇️
implants/eldritch/src/lib.rs 93.58% <100.00%> (ø)
implants/eldritch/src/sys.rs 57.77% <100.00%> (ø)
implants/imix/src/main.rs 77.77% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@Cictrone
Copy link
Collaborator

it fails D:

Cictrone and others added 4 commits June 15, 2023 19:31
* Update tests.yml

needed

* Update tests.yml

ugg windows

* Update tests.yml

fml
* Couple tests.

* Resolve async errors.
* Updated docs.

* Added golem to toc.

* Fix typo start to sort by name.

* Add assets docs.

* Unified wording.

* Clean up spelling.
@hulto hulto force-pushed the 194-expand-shell-command-to-return-exit-code-and-stderr branch from bcc0163 to 6a27258 Compare June 16, 2023 02:34
Copy link
Collaborator

@Cictrone Cictrone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blorp

@Cictrone Cictrone merged commit 10683d4 into main Jun 16, 2023
@Cictrone Cictrone deleted the 194-expand-shell-command-to-return-exit-code-and-stderr branch June 16, 2023 16:09
KCarretto pushed a commit that referenced this pull request Feb 1, 2024
 
194 expand shell command to return exit code and stderr (#209)

* sysshell now return dict with stdout stderr status

* Expanded sys exec output.

* Update tests.yml (#207)

* Update tests.yml

needed

* Update tests.yml

ugg windows

* Update tests.yml

fml

* 182 eldritch sleep blocks imix agent (#208)

* Couple tests.

* Resolve async errors.

* 193 resolve docs issues (#195)

* Updated docs.

* Added golem to toc.

* Fix typo start to sort by name.

* Add assets docs.

* Unified wording.

* Clean up spelling.

* Update tests.

* Removed double defined test.

---------

Co-authored-by: Nicholas O'Brien <ndo9903@rit.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-change cleanup Code cleanup and tech debt removal eldritch Related to the Eldritch language
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expand shell command to return exit code, and stderr.
2 participants