Skip to content

craft-hub / assertCommandWorkingDirectory

Function: assertCommandWorkingDirectory()

assertCommandWorkingDirectory(projectPath, cwd): Promise<void>

Defined in: packages/craft-hub/src/path-security.ts:5

Resolve and validate that a command working directory stays inside its trusted project.

Parameters

projectPath

string

cwd

string

Returns

Promise<void>

Released under the MIT License.