Skip to content

Commit

Permalink
fix invoking script file: alpine/busybox compatibility
Browse files Browse the repository at this point in the history
also write to stderr not out
  • Loading branch information
phil294 committed Oct 3, 2023
1 parent 64d4736 commit 31beec9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hacks.cr
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Hacks
# Crystal doesn't seem to support any such functionality?
def self.is_utf8_file_no_bom(path)
begin
return Process.run("iconv", ["-f", "utf8", path, "-t", "utf8"]).exit_code == 0 &&
return Process.run("iconv", ["-f", "utf8", "-t", "utf8", path]).exit_code == 0 &&
! `file -b #{path}`.includes?("BOM")
rescue
return true
Expand Down

0 comments on commit 31beec9

Please sign in to comment.