-
Notifications
You must be signed in to change notification settings - Fork 222
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
Rex::Commands::Fs::df
fails on tcsh
#1529
Comments
Thanks for the report, @rwp0! Could you attach a debug output from In case you'd like to take a closer look at what might be going wrong meanwhile: Rex runs |
@ferki thanks for mentioning the It seems df (without arguments) looks for a device resulting in Short:
Long:
|
Thanks for the debug logs, and for nicely formatting them as code! ❤️ The full output can get quite long, so that might be easier to attach as file next time 😉 Debug log analysisAs you found in the debug log correctly, the part leading to the error is:
The debug log also shows that rex found In that sense it's related more to Possible workarounds
Possible fixThere are a few code smells around the current execution logic:
It's probably best to simplify that, and might also be possible to either:
Risks
|
AFAIK GitHub doesn't support attaching files natively, so pastebin services could be used/suggested for that purpose (t)csh is (and always was IIRC) the default shell in FreeBSD so the Rex I completely agree with all your points, and I appreciate your very much detailed response, prompt reaction, and the label being added 🙂
Unfortunately tcsh doesn't support
Footnotes |
Pasting/attaching
Pastebin services work too, though there's usually less control over their long-time availability, and using them also means scattering information-that-belongs-together across services. A GitHub gist might be a good choice to "stay close", but in general I prefer Attaching files directly to the issue to preserve the information long-term in a single place. (And then take an offline backup with something like git-bug or similar, but I digress). tcsh
Yeah, I don't think I've encountered We can think about introducing more test coverage perhaps (at least via CPAN testers, there's no native BSD option for GitHub Actions as far as I know, but there might some workarounds for that). Details
I'm glad you appreciate the detail. I tend to dump my thoughts as I go as reference for future readers (often myself 🤣), and that often ends up highly detailed. I guess it's a case of "I didn't have time to write a shorter answer" 🙃 Redirect with tcsh
Yeah, that's the info I found too; thanks for confirming it and for the tips, and nice to see a code-maven link about it 👍 Big pictureFor the big picture I have these in mind currently:
It might take some time until someone goes through all that, though. Small picture :)For this specific code part, I'd probably go for just dropping the STDERR handling, since that is ignored in the context of If |
Rex::Commands::Fs::df
fails on tcsh
Describe the bug
df actually returns empty hash reference with or without a device argument in FreeBSD 13.1 (latest) release
https://metacpan.org/pod/Rex::Commands::Fs#df([$device])
Expected behavior
hashref reflecting df(1) command's output
How to reproduce it
Code example
No response
Additional context
No response
Rex version
1.13.4
Perl version
5.36.0
Operating system running rex
Debian 11
Operating system managed by rex
FreeBSD
How rex was installed?
cpan client
The text was updated successfully, but these errors were encountered: