diff --git a/Formula/python-tk@3.9.rb b/Formula/python-tk@3.9.rb index 0b05d0f7c175..241f2319e1f2 100644 --- a/Formula/python-tk@3.9.rb +++ b/Formula/python-tk@3.9.rb @@ -39,17 +39,16 @@ def install ] ) EOS - system Formula["python@3.9"].bin/"python3", *Language::Python.setup_install_args(libexec), - "--install-lib=#{libexec}" - rm_r Dir[libexec/"*.egg-info"] + system "python3.9", *Language::Python.setup_install_args(libexec), "--install-lib=#{libexec}" + rm_r libexec.glob("*.egg-info") end end test do - system Formula["python@3.9"].bin/"python3", "-c", "import tkinter" + system "python3.9", "-c", "import tkinter" return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"] - system Formula["python@3.9"].bin/"python3", "-c", "import tkinter; root = tkinter.Tk()" + system "python3.9", "-c", "import tkinter; root = tkinter.Tk()" end end