Skip to content

conflict in regex with g in replacement part #36

@camlafit

Description

@camlafit

Hi

This code doens't work

    - replace:
        filename: "/etc/nginx/nginx.conf"
        from: /conf.d\/outlets\//
        to: /etc/g
        global: true

with this error :

.../pups-1.4.0/lib/pups/replace_command.rb:20:in `eval': (eval):1: unknown regexp option - g (SyntaxError)
/etc/g
     ^~~~~~

Pups use g in replacement part as global option in regex.
Note : To quote or escape don't work as workaround

Thanks

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