Comments (3)
Two thoughts:
- Try to resolve hostname via gethostbyname / find in ssh config, or
- Don't do any validation, just detect and report the error case via sensible exceptions (EAFP)
I like 2 because it opens the door for constructs like ssh('proxy').ssh('prod').git.pull() (where prod is not known to the originating host)
from budgie.
I do think that execution of nested ssh as in option 2 is important especially when you get into cases as you suggest, but this gets to the question that we talked about in issue #1
If we have the situation of the construct:
ssh('proxy').ssh('prod').git.pull()
Where should we be resolving the sh module command lookups? and how far do we drill as the above example is across 2 hosts.
This is something that I am not sure how to handle yet?
from budgie.
Implementation going forward will use option 2 where we take the EAFP approach and work on the exceptions rather than complex host validations that will lead to false positives.
This also allows cadre to maintain its alignment with sh
I have opened issue #3 to capture thoughts on how exceptions should be dealt with.
from budgie.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from budgie.