Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

code-server: drop unneeded write_env_script #179469

Merged
merged 2 commits into from
Aug 3, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions Formula/c/code-server.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
require "language/node"

class CodeServer < Formula

Check warning on line 1 in Formula/c/code-server.rb

View workflow job for this annotation

GitHub Actions / Linux

`brew linkage --cached --test --strict code-server` failed on Linux!

Indirect dependencies with linkage: krb5
desc "Access VS Code through the browser"
homepage "https://github.com/coder/code-server"
url "https://registry.npmjs.org/code-server/-/code-server-4.91.1.tgz"
Expand Down Expand Up @@ -33,8 +31,7 @@
# Fix broken node-addon-api: https://github.com/nodejs/node/issues/52229
ENV.append "CXXFLAGS", "-DNODE_API_EXPERIMENTAL_NOGC_ENV_OPT_OUT"

node = Formula["node@20"]
system "npm", "install", *Language::Node.local_npm_install_args, "--unsafe-perm", "--omit", "dev"
system "npm", "install", *std_npm_args(prefix: false), "--unsafe-perm", "--omit", "dev"

# @parcel/watcher bundles all binaries for other platforms & architectures
# This deletes the non-matching architecture otherwise brew audit will complain.
Expand All @@ -47,8 +44,7 @@
unneeded_prebuilds.map(&:rmtree)

libexec.install Dir["*"]
env = { PATH: "#{node.opt_bin}:$PATH" }
(bin/"code-server").write_env_script "#{libexec}/out/node/entry.js", env
bin.install_symlink libexec/"out/node/entry.js" => "code-server"
end

def caveats
Expand Down
Loading