Skip to content

Commit 602f089

Browse files
committed
Avoid the use of tail for OS portability
1 parent 9af448e commit 602f089

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/smoke_test/smoke_test.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@ def get_anaconda_output_for_package(pkg_name_str):
2424

2525
# ignore the header row:
2626
# Name Version Build Channel
27-
cmd = 'conda list -f ' + pkg_name_str + ' |tail -n 1 '
27+
cmd = 'conda list -f ' + pkg_name_str
2828
output = sp.getoutput(cmd)
29-
return output
29+
# Get the last line only
30+
return output.strip().split('\n')[-1]
3031

3132
# only makes sense to check nightly package where dates are known
3233
def check_nightly_binaries_date() -> None:

0 commit comments

Comments
 (0)