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

[bin] don't print warning when which/rover is not available #521

Merged
merged 1 commit into from
Dec 5, 2017

Conversation

mikz
Copy link
Contributor

@mikz mikz commented Dec 4, 2017

just don't print any error output when trying to detect rover

@mayorova
Copy link
Contributor

mayorova commented Dec 5, 2017

Maybe we could replace which rover with type -p rover ? So it can potentially be used on OSs that don't have which

@mikz
Copy link
Contributor Author

mikz commented Dec 5, 2017

@mayorova type -p outputs rover is ./lua_modules/bin/rover for me. Which can't be used as an executable. On zsh type is whence -v. In apicast image neither of those work: which, whence, type.

@mikz mikz requested a review from davidor December 5, 2017 11:55
@mayorova
Copy link
Contributor

mayorova commented Dec 5, 2017

@mikz OK, interesting

For me type -p returns just the filename (without -p it does return X is). And apicast's bash does have type, but yeah, when run at the startup it's not available indeed.

How about command -v rover? :)

It should work find, no? For example, it does find the openresty executable:

docker run quay.io/3scale/apicast:master command -v openresty

`command` works in simple shell (not only bash/zsh)
@mikz
Copy link
Contributor Author

mikz commented Dec 5, 2017

@mayorova updated to command -v.

Copy link
Contributor

@mayorova mayorova left a comment

Choose a reason for hiding this comment

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

Looks good :)

@mikz mikz merged commit 122b288 into master Dec 5, 2017
@mikz mikz deleted the bin-warning branch December 5, 2017 12:48
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.

2 participants