Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command that runs in terminal not running in 'run on save' #62

Open
Jofkos opened this issue Jan 6, 2022 · 0 comments
Open

Command that runs in terminal not running in 'run on save' #62

Jofkos opened this issue Jan 6, 2022 · 0 comments

Comments

@Jofkos
Copy link

Jofkos commented Jan 6, 2022

My config is

{
	"match": "\\.drawio$",
	"runIn": "backend",
	"cmd": "draw.io --crop --export -f pdf \"${file}\""
}

when running it, I get

Running on save commands...
*** cmd start: draw.io --crop --export -f pdf "myfile.drawio"
draw.io: bad option: --crop
draw.io: bad option: --export
draw.io: bad option: -f
Run on Save done.

yet when manually running that exact command (draw.io --crop --export -f pdf "myfile.drawio") in the terminal, it works just fine.

What's going on here, and how can I get around this?

//EDIT: It apparently runs node instead of the application specified. No idea why.

Running on save commands...
*** cmd start: draw.io --help
Usage: node [options] [ script.js ] [arguments]
       node inspect [options] [ script.js | host:port ] [arguments]

Options:
  -                           script read from stdin (default if no
                              file name is provided, interactive mode
                              if a tty)
  --                          indicate the end of node options
  --abort-on-uncaught-exception
                              aborting instead of exiting causes a
                              core file to be generated for analysis
  -c, --check                 syntax check script without executing
  --completion-bash           print source-able bash completion
                              script
[...]

Documentation can be found at https://nodejs.org/
Run on Save done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant