From 4a74692277c462c3d4dd655ec431373284a48a92 Mon Sep 17 00:00:00 2001 From: Kristoffer Carlsson Date: Tue, 7 Jan 2020 10:45:45 +0100 Subject: [PATCH] use expanduser instead of replace with homedir() (#1595) --- src/REPLMode/argument_parsers.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/REPLMode/argument_parsers.jl b/src/REPLMode/argument_parsers.jl index 66380a955d..9f4151d49b 100644 --- a/src/REPLMode/argument_parsers.jl +++ b/src/REPLMode/argument_parsers.jl @@ -104,7 +104,7 @@ end # Registries can be identified through: uuid, name, or name+uuid # when updating/removing. When adding we can accept a local path or url. function parse_registry(word::AbstractString; add=false)::RegistrySpec - word = replace(word, "~" => homedir()) + word = expanduser(word) registry = RegistrySpec() if add && isdir_windows_workaround(word) # TODO: Should be casesensitive_isdir if isdir(joinpath(word, ".git")) # add path as url and clone it from there