Sublime Forum

Need sudo to build

#1

Because stupid Apple has now required that clang’s linker use sudo to write its output file the build system needs to include sudo and prompt for a password (of course).

I can’t get this to work:

{
    "cmd": "sudo", "nimrod", "c", "$file"],
    "selector": "source.nimrod",

    "variants": 
        {
            "cmd": "sudo", "nimrod", "c", "-r", "--verbosity:0", "--hints:off", "$file"],
            "selector": "source.nimrod",
            "name": "Run"
        }
    ]
}

Here is the error output:

sudo: no tty present and no askpass program specified

Clearly, where Sublime Text runs things isn’t really a terminal or sudo can’t be invoked through a cmdline interface (go figure).

So, what should I do here?

1 Like