Skip to content

Commit 3123668

Browse files
authored
Merge pull request #1121 from compas-dev/fix-newline-in-here
fix #1120: strip readlink result
2 parents dc4d41d + 352dcf9 commit 3123668

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
### Changed
1313

14+
* Fixed bug that caused a new-line at the end of the `compas.HERE` constant in IronPython for Mac.
15+
1416
### Removed
1517

1618

src/compas/_os.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ def _realpath_ipy_posix(path):
300300
args = 'readlink -f "{}"'.format(path)
301301
process = subprocess.Popen(args, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
302302
output, _error = process.communicate()
303-
return output
303+
return output.strip()
304304

305305

306306
# Cache whatever symlink function works (native or polyfill)

0 commit comments

Comments
 (0)