Skip to content

Commit bc9b364

Browse files
committed
feat: ✨ support workspaces in features
1 parent e87053d commit bc9b364

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

install.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ source=$(dirname $(readlink -f $0))
66
# Source the common utils
77
. $source/src/common-utils/_zz_colors.sh
88

9+
alias zz_log=$source/src/common-utils/_zz_logs.sh
10+
911
# Prepare for local installation by creating a temporary directory and linking common utils
1012
find $source/src/common-utils/ -type f -name "_*.sh" -exec echo {} \; -exec chmod +x {} \; | while read file; do
1113
ln -sf $file $source/src/common-utils/$(basename $file | sed 's/^_//;s/.sh$//')
@@ -23,6 +25,8 @@ eval $(
2325
help
2426
)
2527

28+
zz_log i "Installing devcontainer/features"
29+
2630
# If 'all' argument is provided, set stubs and features to install all default features
2731
if [ -n "$all" ]; then
2832
echo "${Yellow}Add default features${End}"
@@ -88,7 +92,7 @@ if [ -n "$features" ]; then
8892
alias install-feature=$(dirname $0)/src/common-utils/_install-feature.sh
8993

9094
# Check if the script is running inside a container
91-
if [ "$CODESPACES" != "true" ] && [ "$REMOTE_CONTAINERS" != "true" ]; then
95+
if [ "$CODESPACES" != "true" ] && [ "$REMOTE_CONTAINERS" != "true" ] && [ -z "$DEV_CONTAINER_FILE_PATH"]; then
9296

9397
echo "${Red}You are not in a container${End}"
9498

src/common-utils/_configure-feature.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,9 @@ export source=${source:-/usr/local/share/$feature}
2323
export tabSize=4
2424

2525
zz_log i "Configure feature <{Purple $feature}>"
26+
zz_log - "In {U $(pwd)}"
2627
zz_log - "From {U $source}"
2728

28-
# Go to the module root
29-
cd "$(git rev-parse --show-toplevel)" >/dev/null
30-
3129
# Ensure the source directory exists
3230
if [ ! -d $source ]; then
3331
zz_log e "Source directory <$source> does not exist"

0 commit comments

Comments
 (0)