Fix errors passing project arg through container init in dev func
Fix usage of old PROJECTS_DIR env var in starship setup
This commit is contained in:
@@ -9,7 +9,7 @@ function dev() {
|
||||
fi
|
||||
|
||||
if [ -f '/run/.toolboxenv' ]; then
|
||||
cd "${PROJECTS_DIR}/${project}";
|
||||
cd "${PROJECTS_PATH}/${project}";
|
||||
|
||||
if [ -f "${PWD}/ansible.cfg" ]; then
|
||||
export ANSIBLE_CONFIG="${PWD}/ansible.cfg";
|
||||
@@ -19,7 +19,7 @@ function dev() {
|
||||
if [ -f "${PWD}/pyproject.toml" ]; then
|
||||
poetry_venv=$(poetry env info --path)
|
||||
|
||||
if [ ! -z "${poetry_venv}" ]; then
|
||||
if [ ! -z "${poetry_venv}" ] && [ -f "${poetry_venv}/bin/activate" ]; then
|
||||
source "${poetry_venv}/bin/activate";
|
||||
fi
|
||||
fi
|
||||
@@ -40,7 +40,7 @@ function dev() {
|
||||
echo ">>> ${PWD}"
|
||||
toolbox enter "${container_name}"
|
||||
echo ">>> Exited: ${container_name}"
|
||||
cd ${current}
|
||||
cd "${current}"
|
||||
|
||||
podman container stop "${container_name}" &>/dev/null
|
||||
podman container rm --force "${container_name}" &>/dev/null
|
||||
@@ -48,7 +48,8 @@ function dev() {
|
||||
}
|
||||
|
||||
if [ -f '/run/.toolboxenv' ]; then
|
||||
if [ "${PWD}" == "$PROJECTS_PATH/*" ]; then
|
||||
if [[ "${PWD}" == $PROJECTS_PATH/* ]]; then
|
||||
dev $(basename "${PWD}")
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user