The check that `t4` is not an external command would always succeed, but
not because the file wasn't executable, but because it wasn't even found
due to the missing `brew-` prefix.
Also change the valid but atypical file mode from 0744 to 0755 and apply
minor code style fixes.
* add Language::Node helper module
This adds a language module for Node module based formulas.
It contains the 2 public methods `std_npm_install_args(libexec)` and
`local_npm_install_args`:
* `std_npm_install_args` is intended to be used in formulas for
standard node modules and returns `npm install` args for a global
style module installation to libexec.
* `local_npm_install_args` is for formulas, in which the `npm install`
step is only one of multiple parts of the installation process and
returns `npm install` args for a default local installation in place.
Both methods have in common, that they are
* making sure that a working copy of npm and node-gyp from node's
libexec is prepended to the PATH (to not rely of a user managed npm)
* seting the npm cache to HOMEBREW_CACHE/npm, which fixes issues caused
by overriding $HOME resulting in long install times + high disk usage
(see https://github.com/Homebrew/brew/pull/37#issuecomment-208840366)
* audit: update npm install check for Language::Node
* cleanup: remove npm_cache too
* doc: add Node-for-Formula-Authors.md
Also enables sandbox for --interactive and --debug use of install
and test, using automatic retention.
Closes#66.
Signed-off-by: Andrew Janke <andrew@apjanke.net>
Makes `tap` re-runnable and unshallows when requested with `--full`.
Tapping with a different URL raises an exception.
The homebrew/core tap cannot be untapped with `untap` so running
`brew tap --full homebrew/core` is now a built-in way to get a full
clone of this tap without resorting to workarounds.
Closes#17.
Signed-off-by: ilovezfs <ilovezfs@icloud.com>
* Count .DS_Store disk usage but not file count.
* Count symlink's own disk usage instead of ignoring it.
* Count hardlinks disk usage only once.
* Add testcase.
ClosesHomebrew/homebrew#50563.
ClosesHomebrew/homebrew#50566.
Signed-off-by: Xu Cheng <xucheng@me.com>
This can become handy when we separate core code and formulae. For
example, we could use `cd $(brew --repo homebrew/core)` to go to core
tap path.
ClosesHomebrew/homebrew#50346.
Signed-off-by: Xu Cheng <xucheng@me.com>
`Library/ENV` like `Library/Homebrew` is part of Homebrew basecode. It
should be able to be accessed during the `brew tests`.
By adding HOMEBREW_ENV_PATH variable, we allow test suit to locate these
codes.
Running brew audit --strict --online on a formula with a GitHub
homepage/url would crash if HOMEBREW_NO_GITHUB_API is set because
GitHub.repository returns `nil` and the audit code assumes it always
returns a hash.
ClosesHomebrew/homebrew#50054.
Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
These methods will be used in `brew --version`, `brew config`
and `brew doctor` after core/formula separation.
ClosesHomebrew/homebrew#49796.
Signed-off-by: Xu Cheng <xucheng@me.com>
Groups make it easier to get an overview of the coverage without having
to scan through a single very long list of files. They also display a
possibly helpful per-group coverage.
The project name is normally derived from the `root` directory which
happens to be `Library` in our case, thus make it explicitly `Homebrew`.
ClosesHomebrew/homebrew#49303.
Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
The current code doesn't work with releases that have more than one
digit in the third group, i.e.:
.../releases/download/1.2.3/... works
.../releases/download/1.2.34/... doesn't work
ClosesHomebrew/homebrew#49255.
Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
Return true if given path would present a Formula file in this Tap.
Accepts both absolute path and relative path (relative to this Tap's path)
It offer an abstraction such that caller would not need to worry about
low level file system in the tap.
It will be used in `brew pull` and `brew update`.
ClosesHomebrew/homebrew#49191.
Signed-off-by: Xu Cheng <xucheng@me.com>