mirror of
https://github.com/asdf-vm/asdf.git
synced 2024-11-15 01:28:17 -07:00
Update code that removes comments and trailing whitespace so it works on OSX
This commit is contained in:
parent
28cf1a74b9
commit
603665ebda
@ -579,7 +579,7 @@ strip_tool_version_comments() {
|
||||
|
||||
while IFS= read -r tool_line || [ -n "$tool_line" ]; do
|
||||
# Remove whitespace before pound sign, the pound sign, and everything after it
|
||||
new_line="$(echo "$tool_line" | sed -r -e 's/(\s*\#.*)//')"
|
||||
new_line="$(echo "$tool_line" | cut -f1 -d"#" | sed -e 's/[[:space:]]*$//')"
|
||||
|
||||
# Only print the line if it is not empty
|
||||
if [[ ! -z "$new_line" ]]; then
|
||||
|
Loading…
Reference in New Issue
Block a user