Skip to content

Using "SQLPLUS_EOF" as HEREDOC delimiter causes syntax error message #707

Closed
@JanSchnacki

Description

@JanSchnacki

Code editor

Visual Studio Code

Platform

Windows 10

Version

Bash IDE Extension version 1.32.0

What steps will reproduce the bug?

Creating a file with the following contents reproduces the error for me:

#!/bin/ksh

function test_func {
	sqlplus -S "/ as sysdba" <<-SQLPLUS_EOF
		WHENEVER SQLERROR CONTINUE;
		SELECT * FROM dual;
		EXIT;
	SQLPLUS_EOF
}

How often does it reproduce? Is there a required condition?

Just the call to sqlplus with the HERE document is NOT sufficient.

The error occurs once the call is wrapped in a function.

It is irrelevant if bash or ksh is used in the shebang. It is irrelevant whether the function is declared using

function test_func {

or

test_func() {

syntax.

What is the expected behavior?

no error messages

What do you see instead?

The "problem" area in VSCode shows an error message. Copying that gives this message

[{
	"resource": "/C:/filename.sh",
	"owner": "_generated_diagnostic_collection_name_#0",
	"severity": 4,
	"message": "Syntax error: \"\n\" missing",
	"source": "bash-language-server",
	"startLineNumber": 407,
	"startColumn": 40,
	"endLineNumber": 407,
	"endColumn": 40
}]

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions