Skip to content
This repository was archived by the owner on Feb 23, 2024. It is now read-only.

Commit 159f2b5

Browse files
authored
fix: Fixed path prefix of linked output filenames (#854)
1 parent d9dfbe7 commit 159f2b5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/ArmTemplates/Commands/Executors/CreatorExecutor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ public async Task ExecuteGenerationBasedOnConfiguration()
237237
ApiConfig providedAPIConfiguration = this.creatorParameters.Apis.FirstOrDefault(api => string.Compare(apiResource.Name, ApiTemplateCreator.MakeResourceName(api), true) == 0);
238238
// if the api version is not null the api is split into multiple templates. If the template is split and the content value has been set, then the template is for a subsequent api
239239
string apiFileName = FileNameGenerator.GenerateCreatorAPIFileName(providedAPIConfiguration.Name, this.apiTemplateCreator.IsSplitAPI(providedAPIConfiguration), apiResource.Properties.Value != null);
240-
FileWriter.WriteJSONToFile(apiTemplate, string.Concat(this.creatorParameters.OutputLocation, apiFileName));
240+
FileWriter.WriteJSONToFile(apiTemplate, Path.Combine(this.creatorParameters.OutputLocation, apiFileName));
241241
}
242242
if (globalServicePolicyTemplate != null)
243243
{

src/ArmTemplates/Common/FileHandlers/FileNameGenerator.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ public static string GenerateCreatorAPIFileName(string apiName, bool isSplitAPI,
8181

8282
if (isSplitAPI == true)
8383
{
84-
return isInitialAPI == true ? $@"/{sanitizedAPIName}-initial.api.template.json" : $@"/{sanitizedAPIName}-subsequent.api.template.json";
84+
return isInitialAPI == true ? $@"{sanitizedAPIName}-initial.api.template.json" : $@"{sanitizedAPIName}-subsequent.api.template.json";
8585
}
8686
else
8787
{
88-
return $@"/{sanitizedAPIName}.api.template.json";
88+
return $@"{sanitizedAPIName}.api.template.json";
8989
}
9090
}
9191

0 commit comments

Comments
 (0)