mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
shell: Replace ‘which’ utility with ‘command -v’ shell builtin.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
e48c24872f
commit
9e243c74ed
7
Vagrantfile
vendored
7
Vagrantfile
vendored
@@ -2,13 +2,8 @@
|
|||||||
|
|
||||||
VAGRANTFILE_API_VERSION = "2"
|
VAGRANTFILE_API_VERSION = "2"
|
||||||
|
|
||||||
def command?(name)
|
|
||||||
`which #{name} > /dev/null 2>&1`
|
|
||||||
$?.success?
|
|
||||||
end
|
|
||||||
|
|
||||||
if Vagrant::VERSION == "1.8.7"
|
if Vagrant::VERSION == "1.8.7"
|
||||||
path = `which curl`
|
path = `command -v curl`
|
||||||
if path.include?("/opt/vagrant/embedded/bin/curl")
|
if path.include?("/opt/vagrant/embedded/bin/curl")
|
||||||
puts "In Vagrant 1.8.7, curl is broken. Please use Vagrant 2.0.2 " \
|
puts "In Vagrant 1.8.7, curl is broken. Please use Vagrant 2.0.2 " \
|
||||||
"or run 'sudo rm -f /opt/vagrant/embedded/bin/curl' to fix the " \
|
"or run 'sudo rm -f /opt/vagrant/embedded/bin/curl' to fix the " \
|
||||||
|
@@ -59,7 +59,7 @@ RUN set -e \
|
|||||||
&& tar -xz -C /tmp -f /tmp/docker.tgz \
|
&& tar -xz -C /tmp -f /tmp/docker.tgz \
|
||||||
&& mv /tmp/docker/* /usr/bin \
|
&& mv /tmp/docker/* /usr/bin \
|
||||||
&& rm -rf /tmp/docker /tmp/docker.tgz \
|
&& rm -rf /tmp/docker /tmp/docker.tgz \
|
||||||
&& which docker \
|
&& command -v docker \
|
||||||
&& (docker version 2>/dev/null || true)
|
&& (docker version 2>/dev/null || true)
|
||||||
|
|
||||||
# ...docker-compose...
|
# ...docker-compose...
|
||||||
|
Reference in New Issue
Block a user