File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
src/secret-scanning/scripts Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 77 * https://github.com/github/token-scanning-service/blob/main/docs/public-docs
88 * directory to src/secret-scanning/data/pattern-docs
99 */
10- import { writeFile } from 'fs/promises'
10+ import { writeFile , mkdir } from 'fs/promises'
1111import yaml from 'js-yaml'
12+ import path from 'path'
1213
1314import { getDirectoryContents } from '@/workflows/git-utils'
1415import schema from '@/secret-scanning/data/public-docs-schema'
@@ -52,6 +53,7 @@ async function main() {
5253 const filePath = file . path . replace ( `${ directory } /` , '' )
5354 const localFilePath = `${ SECRET_SCANNING_DIR } /${ filePath } `
5455
56+ await mkdir ( path . dirname ( localFilePath ) , { recursive : true } )
5557 await writeFile ( localFilePath , yaml . dump ( yamlData ) )
5658 }
5759}
You can’t perform that action at this time.
0 commit comments