Skip to content

Commit

Permalink
Update reify.js
Browse files Browse the repository at this point in the history
Addressed style and syntax issues as per GitHub Workflows feedback.
  • Loading branch information
TheCSDev committed Nov 20, 2024
1 parent c35af7c commit d029b47
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions workspaces/arborist/lib/arborist/reify.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ const hgi = require('hosted-git-info')
const rpj = require('read-package-json-fast')

const { dirname, resolve, relative, join } = require('node:path')
const { existsSync } = require("node:fs")
const { depth: dfwalk } = require('treeverse')
const { existsSync } = require('node:fs')
const {
lstat,
mkdir,
Expand Down Expand Up @@ -124,9 +124,11 @@ module.exports = cls => class Reifier extends cls {
// we do NOT want to set ownership on this folder, especially
// recursively, because it can have other side effects to do that
// in a project directory. We just want to make it if it's missing.
let resolvedPath = resolve(this.path);
if(!existsSync(resolvedPath))
const resolvedPath = resolve(this.path)
if (!existsSync(resolvedPath))
{
await mkdir(resolvedPath, { recursive: true })
}

// do not allow the top-level node_modules to be a symlink
await this.#validateNodeModules(resolve(resolvedPath, 'node_modules'))
Expand Down

0 comments on commit d029b47

Please sign in to comment.