Skip to content

ScriptKit crashes when .bashrc contains a function named rg #1607

Description

@russelldavis

My .bashrc file contains this function (simplified here, still reproduces the crash):

rg() {
  command rg "$@"
}
export -f rg

When I start ScriptKit, it crashes, and this shows up in this logs several times:

[2026-01-30 15:04:23.261] [error] Error in app.whenReady Error: stderr: /bin/sh: rg: line 1: syntax error: unexpected end of file
/bin/sh: error importing function definition for `rg'

    at Socket.<anonymous> (file:///Applications/Script%20Kit.app/Contents/Resources/app/out/main/index.mjs:23703:16)
    at Socket.emit (node:events:519:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5)
    at Pipe.onStreamRead (node:internal/stream_base_commons:189:23)

If I remove that function from my .bashrc, the crash doesn't happen.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions