Skip to content

Commit 5107d47

Browse files
committed
fix: version hack for devenv v2
Environment variables were cleared by devcontainer/ci, so we cannot check if the devenv shell is nested.
1 parent dcfeb47 commit 5107d47

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libexec/rsdk/rsdk-setup

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ EOF
112112
# https://discord.com/channels/1036369714731036712/1036369758024650792/1479376272395210885
113113
install_devcontainer_cli() {
114114
local devenv_shell=
115-
if [[ -z ${DEVENV_CMDLINE:-} ]]; then
116-
echo "Not in devenv shell. Enter shell to install npm."
115+
if dpkg --compare-versions "$(devenv --version | cut -d ' ' -f 2)" lt 2.0.0; then
116+
echo "devenv << 2.0.0 supports nested shell, using it to install @devcontainers/cli."
117117
devenv_shell="devenv shell"
118118
fi
119119
if ! $devenv_shell npm install @devcontainers/cli; then

0 commit comments

Comments
 (0)