Skip to content

Commit

Permalink
Get rid of wc -c
Browse files Browse the repository at this point in the history
  • Loading branch information
hasufell committed Feb 18, 2022
1 parent a20aefd commit 65ac0fe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bindist/wrapper.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ instruction_msg() {

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

0 comments on commit 65ac0fe

Please sign in to comment.