Skip to content

Commit 65ac0fe

Browse files
committed
Get rid of wc -c
1 parent a20aefd commit 65ac0fe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bindist/wrapper.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ instruction_msg() {
2525

2626
err_exit() {
2727
msg="Couldn't find a working/matching GHC installation. Consider installing ghc-${GHC_VERSION} via ghcup or build HLS from source."
28+
# adjust Content-Length when changing json
2829
json="{\"jsonrpc\":\"2.0\", \"method\":\"window/showMessage\", \"params\": {\"type\": 1, \"message\": \"${msg}\"}}"
29-
printf "%s\r\n" "Content-Length: $(printf "%s" "${json}" | wc -c)"
30+
printf "%s\r\n" "Content-Length: 203"
3031
printf "%s\r\n"
3132
printf "%s" "${json}"
3233
unset msg json

0 commit comments

Comments
 (0)