Skip to content

Commit 78dca4c

Browse files
authored
Merge pull request #202084 from branchvincent/standard
standard: add head
2 parents 8e35597 + 3384f90 commit 78dca4c

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

Formula/s/standard.rb

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ class Standard < Formula
44
url "https://registry.npmjs.org/standard/-/standard-17.1.2.tgz"
55
sha256 "fb2aaf22460bb3e77e090c727c694a56dd9a9486eec30a0152290a5c6d83757c"
66
license "MIT"
7+
head "https://github.com/standard/standard.git", branch: "master"
78

89
bottle do
910
sha256 cellar: :any_skip_relocation, arm64_sequoia: "d20e97c6540bd3307d244952e9a90986e43b5c11821d88941238a06592dfb422"
@@ -18,18 +19,16 @@ class Standard < Formula
1819

1920
def install
2021
system "npm", "install", *std_npm_args
21-
bin.install_symlink Dir["#{libexec}/bin/*"]
22+
bin.install_symlink libexec.glob("bin/*")
2223
end
2324

2425
test do
25-
test_foo = testpath/"foo.js"
26-
test_foo.write "console.log(\"hello there\")"
27-
output = shell_output("#{bin}/standard #{test_foo} 2>&1", 1)
26+
(testpath/"foo.js").write <<~JS
27+
console.log("hello there")
28+
if (name != 'John') { }
29+
JS
30+
output = shell_output("#{bin}/standard foo.js 2>&1", 1)
2831
assert_match "Strings must use singlequote. (quotes)", output
29-
30-
test_bar = testpath/"bar.js"
31-
test_bar.write "if (name != 'John') { }"
32-
output = shell_output("#{bin}/standard #{test_bar} 2>&1", 1)
3332
assert_match "Expected '!==' and instead saw '!='. (eqeqeq)", output
3433
assert_match "Empty block statement. (no-empty)", output
3534

0 commit comments

Comments
 (0)