Skip to content

Commit 79e4261

Browse files
committed
comby: work around build failure by pinning tar-unix
1 parent 8f127c6 commit 79e4261

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Formula/c/comby.rb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ def install
3737
ENV["OPAMYES"] = "1"
3838

3939
system "opam", "init", "--no-setup", "--disable-sandboxing"
40+
# Workaround for https://github.com/comby-tools/comby/issues/381
41+
system "opam", "exec", "--", "opam", "pin", "add", "tar-unix", "2.6.0"
4042
system "opam", "exec", "--", "opam", "install", ".", "--deps-only", "-y", "--no-depexts"
4143

4244
ENV.prepend_path "LIBRARY_PATH", opamroot/"default/lib/hack_parallel" # for -lhp
@@ -46,27 +48,25 @@ def install
4648
end
4749

4850
test do
49-
expect = <<~EXPECT
50-
--- /dev/null
51-
+++ /dev/null
51+
expect = <<~DIFF
52+
--- test.c
53+
+++ test.c
5254
@@ -1,3 +1,3 @@
5355
int main(void) {
5456
- printf("hello world!");
5557
+ printf("comby, hello!");
5658
}
57-
EXPECT
59+
DIFF
5860

59-
input = <<~INPUT
60-
EOF
61+
(testpath/"test.c").write <<~C
6162
int main(void) {
6263
printf("hello world!");
6364
}
64-
EOF
65-
INPUT
65+
C
6666

6767
match = 'printf(":[1] :[2]!")'
6868
rewrite = 'printf("comby, :[1]!")'
6969

70-
assert_equal expect, shell_output("#{bin}/comby '#{match}' '#{rewrite}' .c -stdin -diff << #{input}")
70+
assert_equal expect, shell_output("#{bin}/comby '#{match}' '#{rewrite}' test.c -diff")
7171
end
7272
end

0 commit comments

Comments
 (0)