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

(cherry picked from commit 198423d6fb)
This commit is contained in:
Jordan Borean 2018-09-21 15:31:12 +10:00 committed by Toshio Kuratomi
parent 01b6f02a80
commit 547be8c957
3 changed files with 7 additions and 1 deletions

View file

@ -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

View file

@ -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

View file

@ -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