comby-tools / comby

A code rewrite tool for structural search and replace that supports ~every language.
https://comby.dev
Apache License 2.0
2.4k stars 62 forks source link

Keep getting Exception: (Sys_error "xxxx.swift: Read-only file system #362

Open ShawnMa16 opened 1 year ago

ShawnMa16 commented 1 year ago

Describe the bug A clear and concise description of what the bug is.

I'm getting Exception: (Sys_error "xxxx.swift: Read-only file system

when trying to run the command

COMBY_M="$(cat <<"MATCH"
switch :[case] {:[body]}
MATCH
)"
COMBY_R="$(cat <<"REWRITE"
switch :[case] {:[body]@unknown default: }
REWRITE
)"
COMBY_RULE="$(cat <<"RULE"
where match :[body] {
| ":[_]@unknown default::[_]" -> false
| ":[_]" -> true
}
RULE
)"
# Install comby with `bash <(curl -sL get.comby.dev)` or see github.com/comby-tools/comby && \
comby "$COMBY_M" "$COMBY_R"  -rule "$COMBY_RULE" .swift -stats -match-newline-at-toplevel -timeout 20 -I

Reproducing

Expected behavior A clear and concise description of what you expected to happen.

Additional context Add any other context about the problem here.