1212from colorama import Fore , Style
1313
1414from vcspull ._internal .config_reader import DuplicateAwareConfigReader
15+ from vcspull ._internal .private_path import PrivatePath
1516from vcspull .config import (
1617 canonicalize_workspace_path ,
1718 expand_dir ,
2122 save_config_yaml_with_items ,
2223 workspace_root_label ,
2324)
24- from vcspull .util import contract_user_home
2525
2626if t .TYPE_CHECKING :
2727 import argparse
@@ -238,7 +238,7 @@ def handle_add_command(args: argparse.Namespace) -> None:
238238 display_url , config_url = _normalize_detected_url (detected_remote )
239239
240240 if not config_url :
241- display_url = contract_user_home ( repo_path )
241+ display_url = str ( PrivatePath ( repo_path ) )
242242 config_url = str (repo_path )
243243 log .warning (
244244 "Unable to determine git remote for %s; using local path in config." ,
@@ -262,7 +262,7 @@ def handle_add_command(args: argparse.Namespace) -> None:
262262
263263 summary_url = display_url or config_url
264264
265- display_path = contract_user_home ( repo_path )
265+ display_path = str ( PrivatePath ( repo_path ) )
266266
267267 log .info ("%sFound new repository to import:%s" , Fore .GREEN , Style .RESET_ALL )
268268 log .info (
@@ -370,7 +370,7 @@ def add_repo(
370370 config_file_path = pathlib .Path .cwd () / ".vcspull.yaml"
371371 log .info (
372372 "No config specified and no default found, will create at %s" ,
373- contract_user_home (config_file_path ),
373+ PrivatePath (config_file_path ),
374374 )
375375 elif len (home_configs ) > 1 :
376376 log .error (
@@ -384,7 +384,7 @@ def add_repo(
384384 raw_config : dict [str , t .Any ]
385385 duplicate_root_occurrences : dict [str , list [t .Any ]]
386386 top_level_items : list [tuple [str , t .Any ]]
387- display_config_path = contract_user_home ( config_file_path )
387+ display_config_path = str ( PrivatePath ( config_file_path ) )
388388
389389 if config_file_path .exists () and config_file_path .is_file ():
390390 try :
0 commit comments