From 019479a94bca5e032dd47f3201364a8a1151851a Mon Sep 17 00:00:00 2001 From: Jorge Cotillo Date: Mon, 6 Dec 2021 09:16:55 -0800 Subject: [PATCH] use localPath to ensure dir exists --- generator/cmd/generateall.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/generator/cmd/generateall.ts b/generator/cmd/generateall.ts index 0cf0f1ba5e..4b3f90b939 100644 --- a/generator/cmd/generateall.ts +++ b/generator/cmd/generateall.ts @@ -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); @@ -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