Fix name of variable used for capturing output when executing a shell command
Merge branch 'hotfix/4118'

Close #4118