diff --git a/ubelt/_win32_links.py b/ubelt/_win32_links.py index 42cb3267..0da90365 100644 --- a/ubelt/_win32_links.py +++ b/ubelt/_win32_links.py @@ -252,6 +252,9 @@ def _win32_symlink(path, link, verbose=0): specially enabled symlink permissions. On Windows 10 enabling developer mode should give you these permissions. """ + if verbose >= 3: + print(f'_win32_symlink {link} -> {path}') + from ubelt import util_cmd if os.path.isdir(path): # directory symbolic link @@ -269,7 +272,8 @@ def _win32_symlink(path, link, verbose=0): command = 'mklink "{}" "{}"'.format(link, path) if command is not None: - info = util_cmd.cmd(command, shell=True) + cmd_verbose = verbose >= 3 + info = util_cmd.cmd(command, shell=True, verbose=cmd_verbose) if info['ret'] != 0: from ubelt import util_repr permission_msg = 'You do not have sufficient privledge' @@ -317,11 +321,14 @@ def _win32_junction(path, link, verbose=0): path = os.path.abspath(path) link = os.path.abspath(link) + if verbose >= 3: + print(f'_win32_junction {link} -> {path}') + from ubelt import util_cmd if os.path.isdir(path): # try using a junction (soft link) if verbose: - print('... as soft link') + print('... as soft link (junction)') # TODO: what is the windows api for this? command = 'mklink /J "{}" "{}"'.format(link, path) @@ -338,7 +345,8 @@ def _win32_junction(path, link, verbose=0): command = None if command is not None: - info = util_cmd.cmd(command, shell=True) + cmd_verbose = verbose >= 3 + info = util_cmd.cmd(command, shell=True, verbose=cmd_verbose) if info['ret'] != 0: from ubelt import util_repr print('Failed command:')