Skip to content

Commit

Permalink
Fix output path for generated artifacts (#45165)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #45165

This is a fix for #45112
This diff changes the codegen so that the output path is computed relative to project root (or `path` if provided) instead of current working directory.

Changelog: [General][Fixed] - Codegen computes output path relative to project root instead of current working directory.

Reviewed By: fkgozali

Differential Revision: D59009821

fbshipit-source-id: 3a138a3508fc239c8600b8c9f242f1c665f8e3c0
  • Loading branch information
dmytrorykun authored and facebook-github-bot committed Jun 26, 2024
1 parent b9ec0e5 commit d3e0430
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ function computeOutputPath(projectRoot, baseOutputPath, pkgJson, platform) {
if (baseOutputPath == null) {
const outputDirFromPkgJson = readOutputDirFromPkgJson(pkgJson, platform);
if (outputDirFromPkgJson != null) {
baseOutputPath = outputDirFromPkgJson;
baseOutputPath = path.join(projectRoot, outputDirFromPkgJson);
} else {
baseOutputPath = projectRoot;
}
Expand Down

0 comments on commit d3e0430

Please sign in to comment.