```# Run pants from sources. Useful for debugging...
# development
h
Copy code
# Run pants from sources.  Useful for debugging.
# Assumes you have the pantsbuild/pants repo checked out in a sibling dir of this dir, named
# 'pants' but overridable with PANTS_SOURCE.

PANTS_SOURCE="${PANTS_SOURCE:-../pants}"

# When running pants from sources you are likely to be modifying those sources, so
# you won't want pantsd running.  You can override this by setting ENABLE_PANTSD=true.
ENABLE_PANTSD="${ENABLE_PANTSD:-false}"

plugins=(
  # Add external plugins here if necessary
)

function string_list() {
  eval local -r list_variable="\${$1[@]}"

  echo -n "["
  for item in ${list_variable}; do
    echo -n "\"${item}\","
  done
  echo -n "]"
}

export PANTS_VERSION="$(cat "${PANTS_SOURCE}/src/python/pants/VERSION")"
export PANTS_PLUGINS="$(string_list plugins)"
export PANTS_PANTSD="${ENABLE_PANTSD}"

exec "${PANTS_SOURCE}/pants" "--no-verify-config" "$@"