From 1e1f5e5ee875dbaee0ca0685db24eb245ba03371 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Mon, 20 May 2024 16:59:42 -0700 Subject: [PATCH] use dirname --- .github/workflows/main.pr.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.pr.yml b/.github/workflows/main.pr.yml index 2abcea73..7bb0112b 100644 --- a/.github/workflows/main.pr.yml +++ b/.github/workflows/main.pr.yml @@ -137,8 +137,8 @@ jobs: pkg_name="$(jq -r '.name' "${targetdir}/package.json")"; # Install the package into a temp dir _tmp="$(mktemp -d)"; - mkdir -p "${_tmp}/node_modules/${pkg_name}"; - cp -ar "${targetdir}"/* "${_tmp}/node_modules/${pkg_name}/"; + mkdir -p "$(dirname "${_tmp}/node_modules/${pkg_name}")"; + cp -ar "${targetdir}" "${_tmp}/node_modules/${pkg_name}"; cd "${_tmp}/node_modules/${pkg_name}"; npm i; cd "${_tmp}/";