Skip to content

Comments

513 update file tree tome to default exclude extraneous dirs#518

Merged
hulto merged 11 commits intomainfrom
513-update-file-tree-tome-to-default-exclude-extraneous-dirs
Jan 30, 2024
Merged

513 update file tree tome to default exclude extraneous dirs#518
hulto merged 11 commits intomainfrom
513-update-file-tree-tome-to-default-exclude-extraneous-dirs

Conversation

@hulto
Copy link
Collaborator

@hulto hulto commented Jan 29, 2024

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Remove unused output from file tree output.

Output is now:

Running `/workspaces/realm/implants/target/debug/golem /workspaces/realm/tavern/tomes/get_net_info/main.eldritch`
Interfaces:

name: lo
ip: 127.0.0.1/8
mac: 00:00:00:00:00:00

name: eth0
ip: 172.17.0.2/16
mac: 02:42:ac:11:00:02

Hostname: 372a47305e3c

Instead of:

Running `/workspaces/realm/implants/target/debug/golem /workspaces/realm/tavern/tomes/get_net_info/main.eldritch`
OUTPUT: ["Interfaces:\n\n", "name: lo\n", "ip: 127.0.0.1/8\n", "mac: 00:00:00:00:00:00\n", "\n", "name: eth0\n", "ip: 172.17.0.2/16\n", "mac: 02:42:ac:11:00:02\n", "\n", "Hostname: 372a47305e3c", "\n", "\n"]
["Interfaces:\n\n", "name: lo\n", "ip: 127.0.0.1/8\n", "mac: 00:00:00:00:00:00\n", "\n", "name: eth0\n", "ip: 172.17.0.2/16\n", "mac: 02:42:ac:11:00:02\n", "\n", "Hostname: 372a47305e3c", "\n", "\n"]

Which issue(s) this PR fixes:

Fixes #513
Fixes #517

@hulto hulto linked an issue Jan 29, 2024 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Jan 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (dee0692) 70.52% compared to head (53eb420) 70.56%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #518      +/-   ##
==========================================
+ Coverage   70.52%   70.56%   +0.03%     
==========================================
  Files         126      126              
  Lines        9591     9587       -4     
==========================================
+ Hits         6764     6765       +1     
+ Misses       2681     2676       -5     
  Partials      146      146              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

#[derive(ProvidesStaticType)]
pub struct Runtime {
stdout_reporting: bool,
pub stdout_reporting: bool,
Copy link
Collaborator

Choose a reason for hiding this comment

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

this doesn't need to be pub, see with_stdout_reporting

}
};

if !result.is_empty() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe we should just print without the :?, that might avoid escaping strings and then we can get rid of the with_stdout_reporting API.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We need to keep the with_stdout_reporting API.
If the tome crashes no output gets printed making it very hard to debug.

@hulto hulto merged commit 6c43bc7 into main Jan 30, 2024
@hulto hulto deleted the 513-update-file-tree-tome-to-default-exclude-extraneous-dirs branch January 30, 2024 01:34
KCarretto pushed a commit that referenced this pull request Feb 1, 2024
 
513 update file tree tome to default exclude extraneous dirs (#518)
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

Successfully merging this pull request may close these issues.

Golem printing doesn't format correctly. Update file tree tome to default exclude extraneous dirs

2 participants