Skip to content

Commit

Permalink
[bug]: darwin package no cpu stats data (#968)
Browse files Browse the repository at this point in the history
Signed-off-by: stone1100 <stonejh1100@gmail.com>
  • Loading branch information
stone1100 committed Apr 17, 2023
1 parent 85c98a7 commit 6913a69
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ build() {


GO_BUILD_ENV=("GOOS=${GOOS}" "GOARCH=${GOARCH}")
if [ "${GOOS}" == "darwin" ]; then
# macOS need enable cgo
# https://github.com/shirou/gopsutil/issues/592
GO_BUILD_ENV+=("CGO_ENABLED=1")
fi
target_file="${BIN_DIR}/${target}/${PACKAGE_NAME}"

# build go package
Expand Down

0 comments on commit 6913a69

Please sign in to comment.