powershell: do not quote join_path result to reflect ShellBase join_path (#45944)

(cherry picked from commit 198423d6fb)
pull/46706/head
Jordan Borean 6 years ago committed by Toshio Kuratomi
parent 01b6f02a80
commit 547be8c957

@ -0,0 +1,2 @@
bugfixes:
- win_copy - Fix issue where the dest return value would be enclosed in single quote when dest is a folder - https://github.com/ansible/ansible/issues/45281

@ -1488,7 +1488,7 @@ class ShellModule(ShellBase):
path = '\\'.join(parts)
if path.startswith('~'):
return path
return '\'%s\'' % path
return path
def get_remote_filename(self, pathname):
# powershell requires that script files end with .ps1

@ -134,6 +134,7 @@
that:
- copy_file_check is changed
- copy_file_check.checksum == 'c79a6506c1c948be0d456ab5104d5e753ab2f3e6'
- copy_file_check.dest == test_win_copy_path + '\\foo-target.txt'
- copy_file_check.operation == 'file_copy'
- copy_file_check.size == 8
- copy_file_actual_check.stat.exists == False
@ -154,6 +155,7 @@
that:
- copy_file is changed
- copy_file.checksum == 'c79a6506c1c948be0d456ab5104d5e753ab2f3e6'
- copy_file.dest == test_win_copy_path + '\\foo-target.txt'
- copy_file.operation == 'file_copy'
- copy_file.size == 8
- copy_file_actual.stat.exists == True
@ -187,6 +189,7 @@
that:
- copy_file_to_folder_check is changed
- copy_file_to_folder_check.checksum == 'c79a6506c1c948be0d456ab5104d5e753ab2f3e6'
- copy_file_to_folder_check.dest == test_win_copy_path + '\\foo.txt'
- copy_file_to_folder_check.operation == 'file_copy'
- copy_file_to_folder_check.size == 8
- copy_file_to_folder_actual_check.stat.exists == False
@ -207,6 +210,7 @@
that:
- copy_file_to_folder is changed
- copy_file_to_folder.checksum == 'c79a6506c1c948be0d456ab5104d5e753ab2f3e6'
- copy_file_to_folder.dest == test_win_copy_path + '\\foo.txt'
- copy_file_to_folder.operation == 'file_copy'
- copy_file_to_folder.size == 8
- copy_file_to_folder_actual.stat.exists == True

Loading…
Cancel
Save