File tree Expand file tree Collapse file tree 2 files changed +2
-7
lines changed Expand file tree Collapse file tree 2 files changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ def get_version(long=False):
88
88
from pathlib import Path
89
89
version = f"{ __version__ } "
90
90
if long :
91
- version += f" ({ Path (sys .executable ). parent . parent } )"
91
+ version += f" ({ Path (sys .argv [ 0 ]) } )"
92
92
return version
93
93
94
94
Original file line number Diff line number Diff line change @@ -79,12 +79,7 @@ run_ok "${TEST_NAME_BASE}-id" cylc help id
79
79
80
80
# Check "cylc version --long" output is correct.
81
81
cylc version --long | head -n 1 > long1
82
- WHICH=" $( command -v cylc) "
83
- PARENT1=" $( dirname " ${WHICH} " ) "
84
- PARENT2=" $( dirname " ${PARENT1} " ) "
85
- echo " $( cylc version) (${PARENT2} )" > long2
86
- # the concise version of the above is a bash quoting nightmare:
87
- # echo "$(cylc version) ($(dirname $(dirname $(which cylc))))" > long2
82
+ echo " $( cylc version) ($( command -v cylc) )" > long2
88
83
cmp_ok long1 long2
89
84
90
85
# --help with no DISPLAY
You can’t perform that action at this time.
0 commit comments