Skip to content

Commit

Permalink
glob full file path
Browse files Browse the repository at this point in the history
  • Loading branch information
camueller committed Oct 19, 2024
1 parent aff083e commit 549075b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .vehicle_profiles/merge.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,8 @@ supportedVehiclesListContent += '# Supported Vehicles\n';
supportedVehiclesListContent += 'For vehicles listed below a WiCAN vehicle profiles exists:\n';
models.forEach(model => supportedVehiclesListContent += `- ${model}\n`);

const automateDirectory = await glob('../docs/content/*.Config/*.Automate')
if(automateDirectory.length == 0 || automateDirectory.length != 1) {
const supportedVehiclesListFilepath = await glob('../docs/content/*.Config/*.Automate/*.Supported_Vehicles.md')
if(supportedVehiclesListFilepath.length == 0 || supportedVehiclesListFilepath.length != 1) {
throw new Error('Unable to determine automateDirectory');
}
const supportedVehiclesListFilepath = `${automateDirectory[0]}/2.Supported_Vehicles.md`
await writeFile(supportedVehiclesListFilepath, supportedVehiclesListContent);
await writeFile(supportedVehiclesListFilepath[0], supportedVehiclesListContent);

0 comments on commit 549075b

Please sign in to comment.