Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes cmd due to oversight in 9c8334a106de900964e52f1ed8ee4155acdfe142 #770

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/rez/tests/test_shells.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,8 @@ def _execute_code(func, expected_output):
out, _ = p.communicate()
self.assertEqual(p.returncode, 0)

# PowerShell and Unix uses \n, cmd etc use \r\n
sh = create_shell()
output = out.strip().split(sh.line_terminator())
output = out.strip().split("\n")

self.assertEqual(output, expected_output)

Expand Down
4 changes: 2 additions & 2 deletions src/rezplugins/shell/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def gen_expected_regex(parts):
"(.*)"
])

p = popen(cmd, stdout=subprocess.PIPE,
p = Popen(cmd, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, shell=True, text=True)
out_, _ = p.communicate()
out_ = out_.strip()
Expand Down Expand Up @@ -243,7 +243,7 @@ def _create_ex():
cmd += ['call {}'.format(target_file)]
is_detached = (cmd[0] == 'START')

p = popen(cmd, env=env, shell=is_detached, **Popen_args)
p = Popen(cmd, env=env, shell=is_detached, **Popen_args)
return p

def get_output(self, style=OutputStyle.file):
Expand Down