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:
@@ -1,5 +1,5 @@
|
|||||||
function set_window_title() {
|
function set_window_title() {
|
||||||
if [ "${PWD}" == "$PROJECTS_DIR/*" ]; then
|
if [ "${PWD}" == "$PROJECTS_PATH/*" ]; then
|
||||||
echo -ne "\033]0; Toolbox: Development \007"
|
echo -ne "\033]0; Toolbox: Development \007"
|
||||||
else
|
else
|
||||||
echo -ne "\033]0; $LOCATION \007"
|
echo -ne "\033]0; $LOCATION \007"
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ function dev() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f '/run/.toolboxenv' ]; then
|
if [ -f '/run/.toolboxenv' ]; then
|
||||||
cd "${PROJECTS_DIR}/${project}";
|
cd "${PROJECTS_PATH}/${project}";
|
||||||
|
|
||||||
if [ -f "${PWD}/ansible.cfg" ]; then
|
if [ -f "${PWD}/ansible.cfg" ]; then
|
||||||
export ANSIBLE_CONFIG="${PWD}/ansible.cfg";
|
export ANSIBLE_CONFIG="${PWD}/ansible.cfg";
|
||||||
@@ -19,7 +19,7 @@ function dev() {
|
|||||||
if [ -f "${PWD}/pyproject.toml" ]; then
|
if [ -f "${PWD}/pyproject.toml" ]; then
|
||||||
poetry_venv=$(poetry env info --path)
|
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";
|
source "${poetry_venv}/bin/activate";
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -40,7 +40,7 @@ function dev() {
|
|||||||
echo ">>> ${PWD}"
|
echo ">>> ${PWD}"
|
||||||
toolbox enter "${container_name}"
|
toolbox enter "${container_name}"
|
||||||
echo ">>> Exited: ${container_name}"
|
echo ">>> Exited: ${container_name}"
|
||||||
cd ${current}
|
cd "${current}"
|
||||||
|
|
||||||
podman container stop "${container_name}" &>/dev/null
|
podman container stop "${container_name}" &>/dev/null
|
||||||
podman container rm --force "${container_name}" &>/dev/null
|
podman container rm --force "${container_name}" &>/dev/null
|
||||||
@@ -48,7 +48,8 @@ function dev() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if [ -f '/run/.toolboxenv' ]; then
|
if [ -f '/run/.toolboxenv' ]; then
|
||||||
if [ "${PWD}" == "$PROJECTS_PATH/*" ]; then
|
if [[ "${PWD}" == $PROJECTS_PATH/* ]]; then
|
||||||
dev $(basename "${PWD}")
|
dev $(basename "${PWD}")
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user