Skip to content

Commit 4acbea4

Browse files
committed
Attempt at fixing unit test failures on Windows
1 parent dbeef11 commit 4acbea4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmd2/cmd2.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1840,7 +1840,8 @@ def _redirect_output(self, statement):
18401840
# REDIRECTION_APPEND or REDIRECTION_OUTPUT
18411841
if statement.output == constants.REDIRECTION_APPEND:
18421842
mode = 'a'
1843-
sys.stdout = self.stdout = open(os.path.expanduser(shlex.split(statement.output_to)[0]), mode)
1843+
sys.stdout = self.stdout = open(os.path.expanduser(shlex.split(statement.output_to, posix=False)[0]),
1844+
mode)
18441845
else:
18451846
# going to a paste buffer
18461847
sys.stdout = self.stdout = tempfile.TemporaryFile(mode="w+")

0 commit comments

Comments
 (0)