Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go Lang Error While Replacing Weird Strings. #18

Open
StarkGang opened this issue Feb 16, 2021 · 1 comment
Open

Go Lang Error While Replacing Weird Strings. #18

StarkGang opened this issue Feb 16, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@StarkGang
Copy link

My Code :

name: Sed
on: push
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Find and Replace
        uses: jacobtomlinson/gha-find-replace@master
        with:
          find: 'await event.edit('
          replace: 'await tr(event, '
      - name: Pull All Updates
        uses: stefanzweifel/git-auto-commit-action@v4
        with:
          commit_message: 'Test Translator'
          commit_options: '--no-verify'
          repository: .
          commit_user_name: StarkGang
          commit_user_email: starkgangz@gmail.com
          commit_author: StarkGang <starkgangz@gmail.com>

Error:

panic: regexp: Compile(`await event.edit(`): error parsing regexp: missing closing ): `await event.edit(`

goroutine 1 [running]:
regexp.MustCompile(0xc0000160eb, 0x11, 0xc0001fe000)
	/usr/local/go/src/regexp/regexp.go:311 +0x152
main.findAndReplace(0xc000018960, 0xa, 0xc0000160eb, 0x11, 0xc00001616e, 0x10, 0x200, 0x0, 0x0)
	/app/main.go:43 +0x10b
main.main()
	/app/main.go:68 +0x22a

Is There Anyway To fix This? Thanks !

@jacobtomlinson jacobtomlinson added the bug Something isn't working label Feb 22, 2021
@jacobtomlinson
Copy link
Owner

I expect you need to escape the strings like 'await event\.edit\('.

Perhaps the action should do this automatically though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants