Skip to content

Commit

Permalink
Do not use PWD entry as the cwd for fls files
Browse files Browse the repository at this point in the history
When using docker, the PWD entry refers to a directory inside the docker
image. It is much safer to take the dirname of the .fls file as the
working directory.

Related to #1873
  • Loading branch information
jlelong committed Dec 22, 2019
1 parent 650623a commit 2a1cc91
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/components/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -576,12 +576,7 @@ export class Manager {
private parseFlsContent(content: string, flsFile: string): {input: string[], output: string[]} {
const inputFiles: Set<string> = new Set()
const outputFiles: Set<string> = new Set()
let pwd = path.dirname(flsFile)
const pwdRes = /^PWD\s*(.*)$/m.exec(content)
if (pwdRes) {
pwd = pwdRes[1]
}

const pwd = path.dirname(flsFile)
const regex = /^(?:(INPUT)\s*(.*))|(?:(OUTPUT)\s*(.*))$/gm
// regex groups
// #1: an INPUT entry --> #2 input file path
Expand Down

0 comments on commit 2a1cc91

Please sign in to comment.