gm icon indicating copy to clipboard operation
gm copied to clipboard

Anyway to log the command actually running?

Open tommyc38 opened this issue 4 years ago • 5 comments

It's pretty tough to see where you are going wrong with more complex commands without being able to see the actual command being executed. I read the docs but didn't see anything.

tommyc38 avatar Mar 23 '21 20:03 tommyc38

I went through the gm packing in my node_modules/gm/lib/command.js and put a console.log(cmd) in the _spawn function to see what was going on. If anyone has a better alternative, please let me know!

tommyc38 avatar Mar 24 '21 04:03 tommyc38

gm uses the debug package. So you can run your app with the environment variable DEBUG=gm for debug outputs.

So just run DEBUG=gm node src/main.js

p-kuen avatar Mar 27 '21 18:03 p-kuen

@p-kuen, this doesn't work. I have verified the variable is set prior to bootstrapping my node program. Are you sure this is correct? I verified this a number of ways and even ran console.log(process.env) by editing the node_module/gm/lib/command.js script. Everywhere showed DEBUG=gm was set yet nothing was logged.

tommyc38 avatar Aug 05 '21 19:08 tommyc38

Pretty sure, yes. On which OS do you run the command?

p-kuen avatar Aug 06 '21 03:08 p-kuen

I am using OSx Big Sur

tommyc38 avatar Aug 06 '21 16:08 tommyc38