Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions src/child-process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,13 @@ export type ExecResult = {
readonly stderr: string
}

export const exec = (command: string, options: childProcess.ExecOptionsWithStringEncoding): Promise<ExecResult> =>
nodeJsExec(command, { maxBuffer: Infinity, ...options })
export const exec = async (
command: string,
options: childProcess.ExecOptionsWithStringEncoding,
): Promise<ExecResult> => {
console.log(`exec("${command}")`)
const result = await nodeJsExec(command, { maxBuffer: Infinity, ...options })
console.log(`stdout:\n${result.stdout.trim()}`)
console.log(`stderr:\n${result.stderr.trim()}`)
return result
}
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -770,6 +770,8 @@ const validateFolder = (dir: string) =>
.recursiveReaddir(dir)
.filter((f) => path.basename(f).toLowerCase() === 'readme.md')

console.log(`allReadMeFiles:\n${(await allReadMeFiles.toArray()).map((s) => ' ' + s).join('\n')}`)

yield* validateRPFolderMustContainReadme(dir)

yield* allReadMeFiles.flatMap(validateReadMeFile)
Expand Down
Loading