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

tools: don't display command not found #1408

Merged
merged 3 commits into from
Apr 13, 2021
Merged

Conversation

julianoes
Copy link
Collaborator

This just caught my eye.

Copy link
Collaborator

@JonasVautherin JonasVautherin left a comment

Choose a reason for hiding this comment

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

Hmm which terminal did you test it with? For me with zsh and sh:

sh:

$ type podman > /dev/null
$ type podman 2> /dev/null
podman: not found

zsh:

% type podman > /dev/null
% type podman 2> /dev/null
podman not found

So it seems to me that > does what I expect, and 2> does not 🤔

@julianoes
Copy link
Collaborator Author

odd, I tested it in zsh.

@julianoes
Copy link
Collaborator Author

tools/run-docker.sh tools/fix_style.sh .
tools/run-docker.sh: line 5: type: podman: not found
Starting with UID: 1000

@julianoes
Copy link
Collaborator Author

Bash:

type podman > /dev/null
bash: type: podman: not found

@julianoes
Copy link
Collaborator Author

And since this is made for bash I think the PR is correct.

Copy link
Collaborator

@JonasVautherin JonasVautherin left a comment

Choose a reason for hiding this comment

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

It is made for sh: #!/usr/bin/env sh.

What about a tradeoff 😆? Works for me on sh, zsh and bash.

tools/run-docker.sh Outdated Show resolved Hide resolved
tools/run-docker.sh Outdated Show resolved Hide resolved
@julianoes
Copy link
Collaborator Author

Hm, you're right. :)

julianoes and others added 2 commits April 13, 2021 08:13
Co-authored-by: Jonas Vautherin <jonas.vautherin@gmail.com>
Co-authored-by: Jonas Vautherin <jonas.vautherin@gmail.com>
@JonasVautherin JonasVautherin merged commit 988a102 into main Apr 13, 2021
@JonasVautherin JonasVautherin deleted the pr-fix-docker-output branch April 13, 2021 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants