mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00

Formulae that depend on `node` sometimes contain files that use a shebang like `#!/usr/bin/env node` and this can lead to issues when the `node` in a user's environment isn't brewed `node`. For example, some node modules are compiled when the formula is built but if the user's `node` is a different major version than brew's `node`, the differing `NODE_MODULE_VERSION` can produce an error when certain parts of the application are used. The formula may build and test fine and the issue may only become apparent when more of the application is exercised. This adds a `Language::Node::Shebang` module (borrowing from the existing Perl and Python examples), which allows us to use `rewrite_shebang detected_node_shebang, ...` in formulae to address this type of issue.
10 lines
105 B
Ruby
10 lines
105 B
Ruby
# typed: strict
|
|
|
|
module Language
|
|
module Node
|
|
module Shebang
|
|
include Kernel
|
|
end
|
|
end
|
|
end
|