Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

Pass-through shell commands for matched site directories #167

Closed
michaelroper opened this issue Jun 5, 2020 · 3 comments
Closed

Pass-through shell commands for matched site directories #167

michaelroper opened this issue Jun 5, 2020 · 3 comments
Assignees
Milestone

Comments

@michaelroper
Copy link

michaelroper commented Jun 5, 2020

As discussed in #165, it would be great to be able to 'pass through' commands like the `nitro craft update' you mentioned, that when run will pass the current working directory, and run the command from the matching mounted site directory on the VM.

me@local-machine:~/Sites/my-website$ nitro exec composer update
==
ubuntu@nitro-dev:/home/ubuntu/sites/my-website$ composer update

me@local-machine:~/Sites/my-website$ nitro exec ./scripts/pull_db.sh
==
ubuntu@nitro-dev:/home/ubuntu/sites/my-website$ ./scripts/pull_db.sh

Alternatively, if that's not possible, it would be good to at least have some set commands for other common tasks, like nitro composer-install or nitro composer-update.

@jasonmccallister jasonmccallister self-assigned this Dec 14, 2020
@jasonmccallister jasonmccallister added this to the next milestone Dec 14, 2020
@jasonmccallister
Copy link
Member

This will be released with the next version. We also added a nitro queue command that is context aware to help running queues locally.

@jasonmccallister
Copy link
Member

jasonmccallister commented Feb 5, 2021

While this is not "technically" complete, the following commands are now "context-aware" and will detect if you are in a sites directory and should be used as an alternative:

  1. nitro ssh
  2. nitro craft
  3. nitro composer
  4. nitro npm
  5. nitro queue
  6. nitro xon
  7. nitro xoff
  8. nitro share

This should resolve this issue, let me know if we are good to close this one out 👍

@michaelroper
Copy link
Author

Thanks Jason - I was just about to come back and find this issue and say that you absolutely NAILED IT! 🙌

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

No branches or pull requests

2 participants