blob: 5a61c9338b2e01dd0d67420b102a8e33daf92ad2 [file] [log] [blame]
# Copyright 2019 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
function check-for-amber-server {
# Make sure it is running.
if [[ -z "$(pgrep -f 'pm serve .*/amber-files')" ]]; then
fx-error "It looks like serve-updates is not running."
fx-error "You probably need to start \"fx serve\""
return -1
# Warn if it is using the wrong repository.
if [[ -z "$(pgrep -f "pm serve .*${FUCHSIA_BUILD_DIR}/amber-files")" ]]; then
fx-warn "WARNING: It looks like serve-updates is running in a different workspace."
fx-warn "WARNING: You probably need to stop that one and start a new one here with \"fx serve\""
return 0