Skip to content

Commit 019479a

Browse files
committed
use localPath to ensure dir exists
1 parent d6b451a commit 019479a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

generator/cmd/generateall.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ executeSynchronous(async () => {
3434
let localPath = args['local-path'];
3535
let summaryPath = args['summary-log-path'];
3636

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

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

5052
// resolve absolute path

0 commit comments

Comments
 (0)