composio
composio copied to clipboard
fix: Makefile bin/sh compatibility (wsl)
Problem
Was facing this error while running make env in wsl
if [[ -z "$$VIRTUAL_ENV" ]]; then \
echo "No virtual environment is active"; \
The original code used the [[ ... ]] syntax for checking if the VIRTUAL_ENV variable was empty, but [[ ... ]] is a Bash-specific feature and wasn't being interpreted correctly in the Makefile's default shell (/bin/sh).
Change:
Replaced [[ ... ]] with [ ... ] to ensure compatibility with /bin/sh. The -z flag is used to check if the VIRTUAL_ENV variable is either empty or undefined (i.e., a zero-length or null string).