1

I'm trying to run a test script in an azure devops pipeline. I have a test that runs on my own environment but fails in the pipeline.

when I run the following code:

command = '['latexmk', '-pdf', '--interaction=nonstopmode', '/tmp/my_tex.tex']'
output = subprocess.check_output(command,
                                                 stderr=subprocess.STDOUT,
                                                 **check_output_kwargs)

Locally it finishes without errors. When I run it in the DevOps pipeline I get:

subprocess.CalledProcessError: 
Command '['latexmk', '-pdf', '--interaction=nonstopmode', '/tmp/tmp78wpkv3l/Unknown.tex']' 
returned non-zero exit status 12.

Which isn't very descriptive. Does anybody know how to solve this or get more descriptive error messages?

Nathan
  • 3,558
  • 1
  • 18
  • 38

1 Answers1

1

The problem was that latexmk was being run in the wrong folder, fixed with a simple os.chdir(<correct folder>)

Nathan
  • 3,558
  • 1
  • 18
  • 38