PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: comonicon/Comonicon.jl (julia)

Issue:
"Bad substitution error" when using other shell than bash
With version 0.12, I get a `Bad substitution` error when trying to use scripts generated by Comonicon. 
The problem is fixed when I specifically use bash to call the script, *i.e.* calling  `treeknit --help` results in an error, whereas calling `bash treeknit --help` works just fine (the package I try this on is https://github.com/PierreBarrat/TreeKnit.jl). 
When downgrading to v0.11.7, there is no error at all. 

I think the reason is that since v0.12, Tthe script generated by Comonicon in `~/.julia/bin` uses `${BASH_SOURCE[0]}` (as recommended in the main docs of the julia language), but uses `#!/usr/bin/env sh` as a shebang.  
But on Ubuntu, `/bin/sh` points to `dash` (at least on me and my colleagues machines...). Hence the error.

Pull request:
fix #161

Patch:
diff --git a/src/builder/install.jl b/src/builder/install.jl
index 52f2cc35..33dc08b5 100644
--- a/src/builder/install.jl
+++ b/src/builder/install.jl
@@ -107,7 +107,7 @@ function entryfile_script(m::Module, options::Options.Comonicon)
     push!(cmds, "-- \"\${BASH_SOURCE[0]}\" \"\$@\"")
 
     return """
-    #!/usr/bin/env sh
+    #!/usr/bin/env bash
     #=
     JULIA_PROJECT=$(get_scratch!(m, "env")) \\
     exec $(join(cmds, " \\\n    "))


Test patch:
diff --git a/test/builder/install.jl b/test/builder/install.jl
index 3a5f7548..8c74ebff 100644
--- a/test/builder/install.jl
+++ b/test/builder/install.jl
@@ -27,7 +27,7 @@ end
     options = Options.Comonicon(name = "test")
     script = entryfile_script(TestInstall, options)
 
-    @test occursin("#!/usr/bin/env sh", script)
+    @test occursin("#!/usr/bin/env bash", script)
     @test occursin("JULIA_PROJECT=$(get_scratch!(TestInstall, "env"))", script)
     julia_exe = joinpath(Sys.BINDIR, Base.julia_exename())
     @test occursin("exec $julia_exe \\\n", script)
Repository: phoenixframework/phoenix_html (elixir)

Issue:
`link(name, to: %URI{})` as a valid option
I'll submit a PR if this seems like a good idea, but it would be nice for the `to:` option to accept a `%URI{}` struct as a valid option. My thought is that it would be as simple as doing a `to_string` on the URI.

We could just pass through the string to the validate step, or it could have a slightly optimized version of the validation https://github.com/phoenixframework/phoenix_html/blob/master/lib/phoenix_html/link.ex#L254

Pull request:
Allow %URI{} to be passed to link/2 and button/2 as :to
Closes #308 

Patch:
diff --git a/lib/phoenix_html/link.ex b/lib/phoenix_html/link.ex
index f18edb7..b00f5d4 100644
--- a/lib/phoenix_html/link.ex
+++ b/lib/phoenix_html/link.ex
@@ -239,6 +239,10 @@ defmodule Phoenix.HTML.Link do
     {value, opts}
   end
 
+  defp valid_destination!(%URI{} = uri, context) do
+    valid_destination!(URI.to_string(uri), context)
+  end
+
   defp valid_destination!({:safe, to}, context) do
     {:safe, valid_string_destination!(IO.iodata_to_binary(to), context)}
   end


Test patch:
diff --git a/test/phoenix_html/link_test.exs b/test/phoenix_html/link_test.exs
index ad17afd..d8ac210 100644
--- a/test/phoenix_html/link_test.exs
+++ b/test/phoenix_html/link_test.exs
@@ -11,6 +11,18 @@ defmodule Phoenix.HTML.LinkTest do
              ~s[<a data-csrf="#{csrf_token}" data-method="post" data-to="/world" href="/world" rel="nofollow">hello</a>]
   end
 
+  test "link with %URI{}" do
+    url = "https://elixir-lang.org/"
+
+    assert safe_to_string(link("elixir", to: url)) ==
+             safe_to_string(link("elixir", to: URI.parse(url)))
+
+    path = "/elixir"
+
+    assert safe_to_string(link("elixir", to: path)) ==
+             safe_to_string(link("elixir", to: URI.parse(path)))
+  end
+
   test "link with put/delete" do
     csrf_token = Plug.CSRFProtection.get_csrf_token()
 
@@ -93,6 +105,13 @@ defmodule Phoenix.HTML.LinkTest do
              ~s[<button data-csrf="#{csrf_token}" data-method="post" data-to="/world">hello</button>]
   end
 
+  test "button with %URI{}" do
+    url = "https://elixir-lang.org/"
+
+    assert safe_to_string(button("elixir", to: url, csrf_token: false)) ==
+             safe_to_string(button("elixir", to: URI.parse(url), csrf_token: false))
+  end
+
   test "button with post without csrf_token" do
     assert safe_to_string(button("hello", to: "/world", csrf_token: false)) ==
              ~s[<button data-method="post" data-to="/world">hello</button>]