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

Allow execution of commands send data through STDIN #53

Closed
pabloferz opened this issue Sep 30, 2015 · 4 comments
Closed

Allow execution of commands send data through STDIN #53

pabloferz opened this issue Sep 30, 2015 · 4 comments
Labels

Comments

@pabloferz
Copy link

I was trying to set the installation of my vim plugins in the install.conf.yamlfile. Unfortunately, that does not work.

I am using vim-plug to handle vim plugins, so I added vim +PlugInstall +qall as a shell command, but it fails. I believe that is because of this line

ret = subprocess.call(cmd, shell=True, stdin=stdin, stdout=stdout,
                      stderr=stderr, cwd=self._base_directory)

in the commandrunner.py script. A possible solution would be setting stdin=subprocess.PIPE, but I'm not sure if that posses a problem in some scenario.

@pabloferz
Copy link
Author

By the way, thank you for the tool. I love the simplicity of it.

@bchretien
Copy link
Contributor

I am also using dotbot to do the exact same thing. Here's how you can do it:

- shell:
    # Install/update vim plugins
    -
      command: vim -Nu ~/.vimrc.plugins +PlugUpdate +qall &> /dev/null
      stdin: true
      stdout: true
      stderr: true

(my vim-plug entries are in a separate .vimrc.plugins, but using a unique .vimrc would not change anything)

If you don't want it to be done silently in the background, remove the /dev/null redirection.

@anishathalye
Copy link
Owner

Thanks for answering the question @bchretien!

@pabloferz: glad the tool is working for you :)

@pabloferz
Copy link
Author

I see. I missed the part of the README where it says you can enable stdin, stdout and stderr.

Thank you both!

joshjavier added a commit to joshjavier/dotfiles that referenced this issue Apr 16, 2021
The shell command `vim +PlugInstall +qall`, which handles initialization
of vim plugins, fails to execute when running `./install`.

The solution, as mentioned in anishathalye/dotbot#53, is to enable
stdin, stdout, and stderr. `/dev/null` makes the command run silently in
the background.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants