We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b65c264 commit 688047aCopy full SHA for 688047a
scripts/cli/lec.sh
@@ -222,7 +222,15 @@ _getRunningProjectDir() {
222
_listRunningProjects | grep -e "/${project_locator}$" -e "${project_locator}"
223
}
224
_getProjectRoot() {
225
- local dir="${PWD}"
+ local dir="${1}"
226
+
227
+ if [[ -z "${dir}" ]]; then
228
+ return 1
229
+ fi
230
231
+ if [[ -f "${dir}" ]]; then
232
+ dir="${dir%/*}"
233
234
235
while [[ -d "${dir}" ]]; do
236
if [[ -d "${dir}/compose-recipes" ]]; then
0 commit comments