Skip to content

Whitespace in conditions not squashed correctly #2

@loilo

Description

@loilo

Minifying the following code

if [[ $(ls) = '' ]]
then
echo 'Empty folder.'
fi

generates this (invalid) bash script:

if [[ $(ls)= '' ]];then echo 'Empty folder.';fi

Bash complains about the equal sign following the closing parenthese directly with no intermediate whitespace.

bash: conditional binary operator expected
bash: syntax error near `'''

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions