Module: OsCtl::Lib::Utils::Exception

Defined in:
lib/libosctl/utils/exception.rb

Instance Method Summary collapse

Instance Method Details

#denixstorify(backtrace) ⇒ Array<String>

Return a new backtrace with removed ‘/nix/store/…` prefixes

Parameters:

  • backtrace (Array<String>)

Returns:

  • (Array<String>)


6
7
8
9
10
11
12
13
# File 'lib/libosctl/utils/exception.rb', line 6

def denixstorify(backtrace)
  backtrace.map do |line|
    line.sub(
      %r{^/nix/store/[^/]+/lib/ruby/gems/\d+\.\d+\.\d+/gems/},
      ''
    )
  end
end