Closed benlubas closed 5 months ago
I'm not familiar with dvipng
but you're not correctly passing the arguments. They should all be separate in the array like this
nio.process.run({
cmd = "dvipng",
args = {
"-D",
module.config.public.dpi,
"-T",
"tight",
"-bg",
"Transparent",
"-fg",
"cmyk 0.00 0.04 0.21 0.02",
"-o",
png_result,
("%s.dvi"):format(document_name),
},
})
It is not like a shell so you don't need to quote the arguments as you had with cmyk 0.00 0.04 0.21 0.02
That works, thank you. I should read the docs a little closer next time
I'm running into a weird issue where two commands are behaving differently if they're run with
vim.fn.jobstart
ornio.process.run
.Specifically
dvipng
can't produce transparent images withprocess.run
, but can withjobstart
.vs:
Seems like job start does something special with the environment that it runs things in. Is there a way to mimic this with
process.run
or should I just usenio.fn.jobstart
? if you have a concrete explanation for what's happening that'd be great too, I'd not been able to find anyone that has this problem withdvipng
(but it's also probably a niche usecase).