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

/usr/bin/find /non/existent/path | /usr/bin/wc -l => c.out = 2 (should be 0) #79

Open
ghost opened this issue May 26, 2020 · 0 comments

Comments

@ghost
Copy link

ghost commented May 26, 2020

/usr/bin/find /non/existent/path | /usr/bin/wc -l
linux command line return: 0 (correct)
delegator c.out = 2 (incorrect)

As per the above, if I run this on the linux command line, I get 0 (correct).
But when I pass this through delegator, I get 2.

path = '/non/existent/path'
the_command = f'/usr/bin/find {path} | /usr/bin/wc -l'
c = delegator.chain(the_command)
output = (c.out).rstrip()
print(output)
2

and for a path that exists, that returns 1900 on the linux command line, delegator returns 1901.

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

No branches or pull requests

0 participants