Skip to content

Commit fba8ad0

Browse files
committed
fix local
1 parent 89b4d07 commit fba8ad0

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

scripts/setup-workspaces.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,11 @@ register_workspace() {
3838
local workspace_name="$2"
3939

4040
if [[ ! "$workspace_path" = /* ]]; then
41-
workspace_path="$(pwd)/$workspace_path"
41+
if [ "$workspace_path" = "." ]; then
42+
workspace_path="$(pwd)"
43+
else
44+
workspace_path="$(pwd)/$workspace_path"
45+
fi
4246
fi
4347

4448
flow workspace create "$workspace_name" "$workspace_path" 2>/dev/null || true
@@ -105,7 +109,11 @@ if [ -n "${WORKSPACES_INPUT:-}" ]; then
105109
done
106110
fi
107111
else
108-
workspace_name="${WORKSPACE_NAME:-$(basename "${WORKSPACE_PATH:-.}")}"
112+
if [ "${WORKSPACE_PATH:-.}" = "." ]; then
113+
workspace_name="${WORKSPACE_NAME:-$(basename "$PWD")}"
114+
else
115+
workspace_name="${WORKSPACE_NAME:-$(basename "${WORKSPACE_PATH}")}"
116+
fi
109117
register_workspace "${WORKSPACE_PATH:-.}" "$workspace_name"
110118
fi
111119

0 commit comments

Comments
 (0)