Sublime Forum

Build Settings: Unable to find target command

#1

Hello,

when building in Sublime Text 3, I’m trying to use my own “target” file instead of the default exec. The unofficial documentation has the following information (http://docs.sublimetext.info/en/latest/reference/build_systems/configuration.html#bs-target-option):

target: A Sublime Text WindowCommand. Defaults to exec (Packages/Default/exec.py). This command receives all the target command arguments specified in the .sublime-build file (as **kwargs).

When I add the line
"target": "myexec",
to my build settings and build, I get this error message in the command line
Unable to find target command: myexec

I couldn’t find a location for my file myexec.py that didn’t cause this error. My question is now: what do I need to do that myexec.py is executed instead of exec.py, i.e., where do I have to put my file?

Thanks so much for your help,
Tobias

0 Likes

#2

The name of the command is not the same thing as the name of the file that contains it. The name of the command comes from the name of the class that implements the command itself. It just so happens that for the default, the command exec is stored in Default/exec,py.

For some working examples of alternate build targets, you can look here.

1 Like