Skip to content

Commit a32bde5

Browse files
ohitspaulPaul Oh
authored andcommitted
Windows fix; README typo
1 parent 726d644 commit a32bde5

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

ec2instanceconnectcli/EC2InstanceConnectCommand.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def get_command(self):
4343
Generates and returns the generated command
4444
"""
4545
# Start with protocol & identity file
46-
command = "{0} -o 'IdentitiesOnly=yes' -i {1}".format(self.program, self.key_file)
46+
command = '{0} -o "IdentitiesOnly=yes" -i {1}'.format(self.program, self.key_file)
4747

4848
# Next add command flags if present
4949
if len(self.flags) > 0:

tests/test_EC2ConnectCLI.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def test_mssh_no_target(self,
4545
cli = EC2InstanceConnectCLI(instance_bundles, "", cli_command, logger.get_logger())
4646
cli.invoke_command()
4747

48-
expected_command = "ssh -o 'IdentitiesOnly=yes' -i {0} {1} {2}@{3} {4}".format(mock_file, flag, self.default_user,
48+
expected_command = 'ssh -o "IdentitiesOnly=yes" -i {0} {1} {2}@{3} {4}'.format(mock_file, flag, self.default_user,
4949
self.public_ip, command)
5050

5151
# Check that we successfully get to the run
@@ -76,7 +76,7 @@ def test_mssh_no_target_no_public_ip(self,
7676
cli = EC2InstanceConnectCLI(instance_bundles, "", cli_command, logger.get_logger())
7777
cli.invoke_command()
7878

79-
expected_command = "ssh -o 'IdentitiesOnly=yes' -i {0} {1} {2}@{3} {4}".format(mock_file, flag, self.default_user,
79+
expected_command = 'ssh -o "IdentitiesOnly=yes" -i {0} {1} {2}@{3} {4}'.format(mock_file, flag, self.default_user,
8080
self.private_ip, command)
8181

8282
# Check that we successfully get to the run
@@ -107,7 +107,7 @@ def test_mssh_with_target(self,
107107
cli = EC2InstanceConnectCLI(instance_bundles, "", cli_command, logger.get_logger())
108108
cli.invoke_command()
109109

110-
expected_command = "ssh -o 'IdentitiesOnly=yes' -i {0} {1} {2}@{3} {4}".format(mock_file, flag, self.default_user,
110+
expected_command = 'ssh -o "IdentitiesOnly=yes" -i {0} {1} {2}@{3} {4}'.format(mock_file, flag, self.default_user,
111111
host, command)
112112
# Check that we successfully get to the run
113113
# Since both target and availability_zone are provided, mock_instance_data should not be called
@@ -133,7 +133,7 @@ def test_msftp(self,
133133
mock_instance_data.return_value = self.instance_info
134134
mock_push_key.return_value = None
135135

136-
expected_command = "sftp -o 'IdentitiesOnly=yes' -i {0} {1} {2}@{3}:{4} {5}".format(mock_file, flag, self.default_user,
136+
expected_command = 'sftp -o "IdentitiesOnly=yes" -i {0} {1} {2}@{3}:{4} {5}'.format(mock_file, flag, self.default_user,
137137
self.public_ip, 'file1', command)
138138

139139
cli_command = EC2InstanceConnectCommand("sftp", instance_bundles, mock_file, flag, command, logger.get_logger())
@@ -166,7 +166,7 @@ def test_mscp(self,
166166
mock_instance_data.return_value = self.instance_info
167167
mock_push_key.return_value = None
168168

169-
expected_command = "scp -o 'IdentitiesOnly=yes' -i {0} {1} {2}@{3}:{4} {5} {6}@{7}:{8}".format(mock_file, flag, self.default_user,
169+
expected_command = 'scp -o "IdentitiesOnly=yes" -i {0} {1} {2}@{3}:{4} {5} {6}@{7}:{8}'.format(mock_file, flag, self.default_user,
170170
self.public_ip, 'file1', command,
171171
self.default_user,
172172
self.public_ip, 'file4')

0 commit comments

Comments
 (0)