support different working directory (#64)

* support different working directory

* validate working_directory
This commit is contained in:
Naoki Oketani
2020-05-23 15:59:51 +09:00
committed by GitHub
parent 277fc872da
commit 5209022168
8 changed files with 444 additions and 0 deletions

3
src/workdir.ts Normal file
View File

@@ -0,0 +1,3 @@
export function isValid(dir: string): boolean {
return !dir.startsWith('/') && !dir.startsWith('..')
}