Skip to content

Commit

Permalink
Merge pull request #2087 from Azure/jcotillo/fix_summary_path
Browse files Browse the repository at this point in the history
Fix summary log invalid dir
  • Loading branch information
jorgecotillo authored Dec 6, 2021
2 parents d6b451a + 019479a commit 4673365
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions generator/cmd/generateall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ executeSynchronous(async () => {
let localPath = args['local-path'];
let summaryPath = args['summary-log-path'];

// localPath refers to the specs repo (azure-rest-api-specs)
if (!localPath) {
localPath = constants.specsRepoPath;
basePaths = await cloneAndGenerateBasePaths(localPath, constants.specsRepoUri, constants.specsRepoCommitHash);
Expand All @@ -43,8 +44,9 @@ executeSynchronous(async () => {
}

if (!summaryPath) {
// generate default full path
summaryPath = path.join(constants.specsRepoPath, 'summary.log');
// using 'localPath' here because at this point it is guaranteed that the folder got created (when cloneAndGenerateBasePaths function is invoked)
// or is an existing path
summaryPath = path.join(localPath, 'summary.log');
}

// resolve absolute path
Expand Down

0 comments on commit 4673365

Please sign in to comment.