shufo / vscode-blade-formatter

An opinionated Blade file formatter for VSCode

Home Page:https://marketplace.visualstudio.com/items?itemName=shufo.vscode-blade-formatter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Formatting Blade]: Corrupt envoy script - format on save

franckysolo opened this issue · comments

Platform

Linux

Template before formatting

@task('symlink:env', ['on' => $on, 'path' => $path])
    echo "Copy configuration file, please wait..."
    echo "Verify path : " {{ $path }}
    [ -d {{ $path }}/shared ] || mkdir -p {{ $path }}/shared
    @foreach ($sharedFiles as $file => $dest)
        if [ ! -f {{ $path }}/shared/{{ $file }} ]
        then
            echo "The shared file {{ $file }} is missing"
            echo " "
            exit 1
        else
            ln -nfs {{ $path }}/shared/{{ $file }} {{ $currentReleaseDirectory }}/{{ $dest }}{{ $file }}
            echo "Copy file done!"
        fi
    @endforeach
@endtask

Template after formatting

@task('symlink:env', ['on' => $on, 'path' => $path])
    echo "Copy configuration file, please wait..."
    echo "Verify path : " {{ $path }}
    [ -d {{ $path }}/shared ] || mkdir -p {{ $path }}/shared
    @foreach ($sharedFiles as $file => $dest)
        if [ ! -f {{ $path }}/shared/{{ $file }} ]
        then
        echo "The shared file {{ $file }} is missing"
        echo " "
        exit 1
        else
        ln -nfs {{ $path }}/shared/{{ $file }} {{ $currentReleaseDirectory }}/{{ $dest }}{{ $file }}
        echo "Copy file done!"
        fi
    @endforeach
@endtask

Expected Behaviour

the bash part should not be on same column otherwise condition will not work

Relevant log output

No response

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days