Skip to content

Commit

Permalink
fix(core): match all occurences when substituting tokens in targetDef…
Browse files Browse the repository at this point in the history
…aults
  • Loading branch information
AgentEnder committed May 4, 2023
1 parent dfae1bf commit 8f6144d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/nx/src/config/workspaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -958,8 +958,8 @@ function resolvePathTokensInOptions<T extends Object | Array<unknown>>(
`${NX_PREFIX} The {workspaceRoot} token is only valid at the beginning of an option. (${key})`
);
}
value = value.replace('{projectRoot}', project.root);
result[opt] = value.replace('{projectName}', project.name);
value = value.replace(/\{projectRoot\}/g, project.root);
result[opt] = value.replace(/\{projectName\}/g, project.name);
} else if (typeof value === 'object' && value) {
result[opt] = resolvePathTokensInOptions(
value,
Expand Down

0 comments on commit 8f6144d

Please sign in to comment.