From d7610b996cec02ad0da48feb6ba8187caf7ea76d Mon Sep 17 00:00:00 2001 From: Philippe Martin Date: Fri, 19 Nov 2021 11:44:31 +0100 Subject: [PATCH] Permit variable substitution --- devfile-command | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/devfile-command b/devfile-command index 614d2e8..ef2f8ff 100755 --- a/devfile-command +++ b/devfile-command @@ -18,7 +18,8 @@ usage(){ runCommand(){ # test if project directory is empty. If so, nothing to run # command is also valid whan env variable is empty - if [ -z "$(ls -A $ODO_COMMAND_RUN_WORKING_DIR)" ]; then + # Need to execute commands this way in order for variable substitution to work + if [ -z "$(sh -c "ls -A $ODO_COMMAND_RUN_WORKING_DIR")" ]; then return fi if [ -z "$ODO_COMMAND_RUN" ]; then