crystal-icr: fix build with newer crystal (#82978)
parent
c323546f5e
commit
ff60c19f89
|
@ -17,6 +17,18 @@ class CrystalIcr < Formula
|
|||
depends_on "libyaml"
|
||||
depends_on "openssl@1.1"
|
||||
|
||||
# Fix build: src/icr/cli.cr:69:14: Error: undefined method 'parse!' for OptionParser.class
|
||||
# Remove in the next release.
|
||||
patch do
|
||||
url "https://github.com/crystal-community/icr/commit/39d0f075aa5afd895473a223d854089de86f9230.patch?full_index=1"
|
||||
sha256 "51867797493ebd2ec681c57132ca5576cef16b0e188ce2f6cacb41b523ae04ed"
|
||||
end
|
||||
|
||||
# Fix build: src/icr/executer.cr:66:13: Error: undefined method 'rmdir' for Dir.class
|
||||
# https://github.com/crystal-community/icr/commit/2a8b05b5b98a804fb0daa5be4834db4f56db0496
|
||||
# Remove in the next release.
|
||||
patch :DATA
|
||||
|
||||
def install
|
||||
system "make", "install", "PREFIX=#{prefix}"
|
||||
end
|
||||
|
@ -25,3 +37,18 @@ class CrystalIcr < Formula
|
|||
assert_match "icr version #{version}", shell_output("#{bin}/icr -v")
|
||||
end
|
||||
end
|
||||
|
||||
__END__
|
||||
diff --git a/src/icr/executer.cr b/src/icr/executer.cr
|
||||
index 0c1ce0b..102f28e 100644
|
||||
--- a/src/icr/executer.cr
|
||||
+++ b/src/icr/executer.cr
|
||||
@@ -63,7 +65,7 @@ module Icr
|
||||
|
||||
# Remove empty directories, including ".crystal"
|
||||
while empty_dir?(path)
|
||||
- Dir.rmdir(path)
|
||||
+ Dir.delete(path)
|
||||
break if path == dot_crystal_dir
|
||||
path = File.expand_path("..", path)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue