mirror of
https://gitea.invidious.io/iv-org/shard-backtracer.cr.git
synced 2024-08-15 00:53:13 +00:00
Add Backtrace::Line#absolute_path
This commit is contained in:
parent
1b2e5fcc32
commit
f0870daef4
1 changed files with 8 additions and 0 deletions
|
@ -51,6 +51,14 @@ module Backtracer
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def absolute_path : String?
|
||||||
|
return unless path = file
|
||||||
|
return path if path.starts_with?('/')
|
||||||
|
if prefix = configuration.src_path
|
||||||
|
File.join(prefix, path)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def shard_name : String?
|
def shard_name : String?
|
||||||
relative_path
|
relative_path
|
||||||
.try(&.match(configuration.modules_path_pattern))
|
.try(&.match(configuration.modules_path_pattern))
|
||||||
|
|
Loading…
Reference in a new issue