• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

uclibs / application_portfolio / 28464114980

30 Jun 2026 05:39PM UTC coverage: 74.081% (-0.03%) from 74.111%
28464114980

Pull #457

circleci

Janell-Huyck
Fix CircleCI Corepack EACCES by using nvm Node's Yarn.

Skip global corepack enable on cimg's /usr/local Node; prepare and invoke
yarn via corepack from the active nvm installation instead.

Co-authored-by: Cursor <cursoragent@cursor.com>
Pull Request #457: Upgrade stack to Ruby 4.0.5 and Node 26.4.0.

321 of 478 branches covered (67.15%)

Branch coverage included in aggregate %.

10 of 11 new or added lines in 2 files covered. (90.91%)

1 existing line in 1 file now uncovered.

948 of 1235 relevant lines covered (76.76%)

23.88 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

85.71
/lib/javascript_build_env.rb
1
# frozen_string_literal: true
2

3
# jsbundling-rails and bin/yarn shell out to yarn; prepend the Node version from
4
# .nvmrc when nvm is installed so builds work even if an older node or yarn
5
# binary appears earlier on PATH.
6
module JavascriptBuildEnv
2✔
7
  module_function
2✔
8

9
  def apply!(root = default_root)
2✔
10
    node_bin = nvm_node_bin(root)
6✔
11
    return unless node_bin
6✔
12

13
    ENV['PATH'] = "#{node_bin}:#{ENV['PATH']}"
2✔
14
  end
15

16
  def nvm_node_bin(root = default_root)
2✔
17
    nvmrc = root.join('.nvmrc')
12✔
18
    return unless nvmrc.exist?
12✔
19

20
    version = nvmrc.read.strip.delete_prefix('v')
10✔
21
    nvm_dir = ENV.fetch('NVM_DIR') { File.expand_path('~/.nvm') }
10✔
22
    node_bin = File.join(nvm_dir, 'versions', 'node', "v#{version}", 'bin')
10✔
23

24
    node_bin if File.directory?(node_bin)
10✔
25
  end
26

27
  def default_root
2✔
28
    if defined?(Rails) && Rails.application&.initialized?
4!
29
      Rails.root
4✔
30
    else
×
NEW
UNCOV
31
      Pathname.new(File.expand_path('..', __dir__))
×
32
    end
33
  end
34
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc