Skip to content

Commit

Permalink
replace broken replaceuserpath function with existing contractuser one (
Browse files Browse the repository at this point in the history
  • Loading branch information
vtjnash authored and antoine-levitt committed May 9, 2021
1 parent 4c056a1 commit 0f54452
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions base/errorshow.jl
Original file line number Diff line number Diff line change
Expand Up @@ -552,13 +552,6 @@ end
# replace `sf` as needed.
const update_stackframes_callback = Ref{Function}(identity)

function replaceuserpath(str)
str = replace(str, homedir() => "~")
# seems to be necessary for some paths with small letter drive c:// etc
str = replace(str, lowercasefirst(homedir()) => "~")
return str
end

const STACKTRACE_MODULECOLORS = [:magenta, :cyan, :green, :yellow]
const STACKTRACE_FIXEDCOLORS = IdDict(Base => :light_black, Core => :light_black)

Expand Down Expand Up @@ -698,7 +691,7 @@ end
function print_stackframe(io, i, frame::StackFrame, n::Int, digit_align_width, modulecolor)
file, line = string(frame.file), frame.line
stacktrace_expand_basepaths() && (file = something(find_source_file(file), file))
stacktrace_contract_userdir() && (file = replaceuserpath(file))
stacktrace_contract_userdir() && (file = contractuser(file))

# Used by the REPL to make it possible to open
# the location of a stackframe/method in the editor.
Expand Down

0 comments on commit 0f54452

Please sign in to comment.