Skip to content

Whitespace in conditions not squashed correctly #2

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 `'''

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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