Skip to content

Commit

Permalink
adjust toCopy (#1305)
Browse files Browse the repository at this point in the history
Co-authored-by: Justin Milner <jmilner@jmilner-lt2.deka.local>
  • Loading branch information
justinmilner1 and Justin Milner committed May 17, 2024
1 parent 4e33901 commit 7fde022
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion binary/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,11 @@ async function installNodeModuleInTempDirAndCopyToCurrent(package, toCopy) {
console.log(`Copying ${package} to ${toCopy}`);
// This is a way to install only one package without npm trying to install all the dependencies
// Create a temporary directory for installing the package
const adjustedName = toCopy.replace(/^@/, "").replace("/", "-");
const tempDir = path.join(
__dirname,
"tmp",
`continue-node_modules-${toCopy}`,
`continue-node_modules-${adjustedName}`,
);
const currentDir = process.cwd();

Expand Down
4 changes: 3 additions & 1 deletion extensions/vscode/scripts/prepackage.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,9 @@ const exe = os === "win32" ? ".exe" : "";
console.log(`Copying ${package} to ${toCopy}`);
// This is a way to install only one package without npm trying to install all the dependencies
// Create a temporary directory for installing the package
const tempDir = `/tmp/continue-node_modules-${toCopy}`;
const adjustedName = toCopy.replace(/^@/, "").replace("/", "-");

const tempDir = `/tmp/continue-node_modules-${adjustedName}`;
const currentDir = process.cwd();

// Remove the dir we will be copying to
Expand Down

0 comments on commit 7fde022

Please sign in to comment.