Skip to content

Commit

Permalink
fix(misc): calculate cwd relative path correctly for generators and e…
Browse files Browse the repository at this point in the history
…xecutors (#18933)

(cherry picked from commit ace8f8c)
  • Loading branch information
leosvelperez authored and FrozenPandaz committed Sep 7, 2023
1 parent 4365c01 commit 24de089
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/devkit/src/executors/read-target-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@ export function readTargetOptions<T = any>(
targetConfiguration,
schema,
defaultProject,
relative(context.cwd, context.root)
relative(context.root, context.cwd)
) as T;
}
2 changes: 1 addition & 1 deletion packages/nx/src/command-line/generate/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ export async function generate(cwd: string, args: { [k: string]: any }) {
projectsConfigurations,
nxJsonConfiguration
),
relative(cwd, workspaceRoot),
relative(workspaceRoot, cwd),
verbose
);

Expand Down
2 changes: 1 addition & 1 deletion packages/nx/src/command-line/run/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ async function runExecutorInternal<T extends { success: boolean }>(
targetConfig,
schema,
project,
relative(cwd, root),
relative(root, cwd),
isVerbose
);

Expand Down

0 comments on commit 24de089

Please sign in to comment.