fix: Remove dynamic import.

This commit is contained in:
Miles Johnson 2023-08-02 09:39:59 -07:00
parent 889bf1db60
commit deec13b3d0
3 changed files with 6 additions and 2 deletions

View file

@ -1,3 +1,7 @@
# 1.0.1
- Fixed an issue where a module was missing from the build.
# 1.0.0 # 1.0.0
- Will now install `rustup` if it does not exist in the environment. - Will now install `rustup` if it does not exist in the environment.

View file

@ -1,6 +1,6 @@
{ {
"name": "@moonrepo/setup-rust", "name": "@moonrepo/setup-rust",
"version": "1.0.0", "version": "1.0.1",
"description": "A GitHub action for setting up Rust and Cargo.", "description": "A GitHub action for setting up Rust and Cargo.",
"main": "dist/index.js", "main": "dist/index.js",
"scripts": { "scripts": {

View file

@ -2,6 +2,7 @@ import crypto from 'node:crypto';
import fs from 'node:fs'; import fs from 'node:fs';
import os from 'node:os'; import os from 'node:os';
import path from 'node:path'; import path from 'node:path';
import { family } from 'detect-libc';
import * as cache from '@actions/cache'; import * as cache from '@actions/cache';
import * as core from '@actions/core'; import * as core from '@actions/core';
import * as exec from '@actions/exec'; import * as exec from '@actions/exec';
@ -38,7 +39,6 @@ export async function downloadAndInstallBinstall(binDir: string) {
switch (process.platform) { switch (process.platform) {
case 'linux': { case 'linux': {
const { family } = await import('detect-libc');
let lib = 'gnu'; let lib = 'gnu';
if ((await family()) === 'musl') { if ((await family()) === 'musl') {