Skip to content

Commit

Permalink
fix jsenv cli
Browse files Browse the repository at this point in the history
  • Loading branch information
dmail committed Nov 7, 2024
1 parent 9c8bd9b commit 5f8cb17
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions packages/related/cli/jsenv_cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,6 @@ write_files: {
return false;
})();
const copyDirectoryContent = (fromDirectoryUrl, toDirectoryUrl) => {
if (!existsSync(toDirectoryUrl)) {
mkdirSync(toDirectoryUrl, { recursive: true });
}
const directoryEntryNameArray = readdirSync(fromDirectoryUrl);
for (const directoryEntryName of directoryEntryNameArray) {
if (
Expand Down Expand Up @@ -316,6 +313,10 @@ write_files: {
}
}
if (!existsSync(toUrl)) {
const parentDirectoryUrl = new URL("./", toUrl);
if (!existsSync(parentDirectoryUrl)) {
mkdirSync(parentDirectoryUrl, { recursive: true });
}
if (directoryEntryName === "package.json") {
commands.push({
label: "npm install",
Expand Down
2 changes: 1 addition & 1 deletion packages/related/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jsenv/cli",
"version": "0.2.2",
"version": "0.2.3",
"description": "Command Line Interface for jsenv",
"license": "MIT",
"repository": {
Expand Down

0 comments on commit 5f8cb17

Please sign in to comment.