1

I have my own build system for perl test files, and it works just fine except when capturing input. If I have an open file called, e.g., ~/projects/something.pm, on error the output of the build system will be something like Failed test at /home/username/projects/something.pm line 66.

The regex for capturing works fine, the problem is that sublime thinks that the two files are in different paths, so it opens a new tab, and I just want the open file to be brought up front.

Is there any setting to make this "match"?

EDIT: My .sublime-build file is generated every time I run the build, to support the fact that I may want to run a single test instead of all the file. I have my own plugin that detects which test I'm using the cursor position and appends that to the command line. It makes no difference though, since the behaviour is always the same, even with a "standard" build. The contents of the .sublime-build file are like this:

{ "shell_cmd" : "prove $file_path/$file_name" , "working_dir" : "/home/username/projects/", "file_regex": " at (.*.pm) line ([0-9]*)", }

I've tried replacing /home/username with the ~ character, but for some reason this breaks the build system, and when building I just get a black output panel, with the status bar saying "Building...".

I've found the real problem with a workaround anyway, posted that as an answer.

ChatterOne
  • 3,381
  • 1
  • 18
  • 24

1 Answers1

0

The problem in this case was that I didn't notice that the main directory of the project (which is generated beforehand), is actually a link to a directory of another user.

This means that if you add a folder to your project and that folder is a link, in the output you'll get the "real" directory, not the link.

Solved by removing the symbolic link folder from the project and adding the destination of the link as a folder to the project and now it works fine.

ChatterOne
  • 3,381
  • 1
  • 18
  • 24