Sublime Forum

Build system does not work at all

#1

OS: centos 7.
Even when I try the most trivial build system:
{
“cmd”: “ls”
}

it says
no such file or directory: ‘ls’

when I look at the console it says:

Running ls

so it seems that it does run it. What am I doing wrong ?

0 Likes

#2

does "shell_cmd": "ls" make any difference?

0 Likes

#3

no, same problem !

0 Likes

#4

I do apologize for my previous answer… now shell_cmd does seem to work !

0 Likes

#5

What does import os; os.environ['PATH'] in the sublime text console print? And what build are you on?

0 Likes

#6

After closing ST and reopening it, it started to work.

But I still do not know how to just run the program. I tried
cmd": [“make”, “-h”, “;”, “ls”]
and apparently it takes the ‘; ls’ as parameters to make, instead of seeing it as two consecutive commands. What should I do here ?

1 Like

#7

Use shell_cmd with a string if you want to use shell features like compound commands.

1 Like

#8

If you want to execute it as in the shell you should use shell_cmd, e.g. "shell_cmd": "make -h && ls" .
If you want to execute a single program (not shell command) use cmd, e.g. "cmd": ["gcc", "$file"] .

1 Like