Add path prefix if working director specified (#34)

This commit is contained in:
Joe Wilner
2020-07-10 15:20:33 -04:00
committed by GitHub
parent d737e6d962
commit cf72500b28
4 changed files with 13 additions and 5 deletions

View File

@ -157,7 +157,9 @@ async function runLint(lintPath: string, patchPath: string): Promise<void> {
if (!fs.existsSync(workingDirectory) || !fs.lstatSync(workingDirectory).isDirectory()) {
throw new Error(`working-directory (${workingDirectory}) was not a path`)
}
if (!userArgNames.has(`path-prefix`)) {
addedArgs.push(`--path-prefix=${workingDirectory}`)
}
cmdArgs.cwd = path.resolve(workingDirectory)
}