composio icon indicating copy to clipboard operation
composio copied to clipboard

fix: Makefile bin/sh compatibility (wsl)

Open palash018 opened this issue 1 year ago • 0 comments

Problem

Was facing this error while running make env in wsl image  

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).

palash018 avatar Aug 17 '24 20:08 palash018