Skip to content

lcovrc param "geninfo_adjust_src_path" results in "geninfo: ERROR: invalid 'subst' regexp" #253

Closed
@kschwab

Description

@kschwab

Hello,

When using the lcovrc parameter geninfo_adjust_src_path it results in error:

geninfo: ERROR: invalid 'subst' regexp '(?^:s#\$pattern#\$replace#g)': syntax error at (eval 317) line 1, near "(?"

The same error is produced if geninfo_adjust_src_path is set in the lcovrc file. However, using lcovrc parameter substitute does work.

Failing geninfo_adjust_src_path example:

lcov -c -d . --rc geninfo_adjust_src_path="/tmp/build => /usr/src"
:
geninfo: ERROR: invalid 'subst' regexp '(?^:s#\$pattern#\$replace#g)': syntax error at (eval 317) line 1, near "(?"
echo $?
1

Passing substitute example:

lcov -c -d . --substitute="s#/tmp/build#/usr/src#g"
echo $?
0

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