From deec13b3d0b5422af3f5cf858ddacfde8dfa254f Mon Sep 17 00:00:00 2001
From: Miles Johnson <mileswjohnson@gmail.com>
Date: Wed, 2 Aug 2023 09:39:59 -0700
Subject: [PATCH] fix: Remove dynamic import.

---
 CHANGELOG.md | 4 ++++
 package.json | 2 +-
 src/cargo.ts | 2 +-
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 69c2378..5233af5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+# 1.0.1
+
+- Fixed an issue where a module was missing from the build.
+
 # 1.0.0
 
 - Will now install `rustup` if it does not exist in the environment.
diff --git a/package.json b/package.json
index adddfdc..352861a 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@moonrepo/setup-rust",
-  "version": "1.0.0",
+  "version": "1.0.1",
   "description": "A GitHub action for setting up Rust and Cargo.",
   "main": "dist/index.js",
   "scripts": {
diff --git a/src/cargo.ts b/src/cargo.ts
index 7cfe4f0..4a1b178 100644
--- a/src/cargo.ts
+++ b/src/cargo.ts
@@ -2,6 +2,7 @@ import crypto from 'node:crypto';
 import fs from 'node:fs';
 import os from 'node:os';
 import path from 'node:path';
+import { family } from 'detect-libc';
 import * as cache from '@actions/cache';
 import * as core from '@actions/core';
 import * as exec from '@actions/exec';
@@ -38,7 +39,6 @@ export async function downloadAndInstallBinstall(binDir: string) {
 
 	switch (process.platform) {
 		case 'linux': {
-			const { family } = await import('detect-libc');
 			let lib = 'gnu';
 
 			if ((await family()) === 'musl') {