Comments (4)
from dropship.
The parsing at https://github.com/ChrisMcKenzie/dropship/blob/master/dropship/hook_script.go could be updated to allow for piping...
from dropship.
I think the way I should have done this is to wrap the command in /bin/bash -c
so instead of the just executing the command we send it through an interpreter.
So on https://github.com/ChrisMcKenzie/dropship/blob/master/dropship/hook_script.go#L32:
instead of
func executeCommand(c, cwd string) (string, error) {
sCmd := strings.Fields(c)
cmd := exec.Command(sCmd[0], sCmd[1:]...)
if _, err := os.Stat(cwd); !os.IsNotExist(err) {
cmd.Dir = cwd
}
out, err := cmd.Output()
return string(out), err
}
it would be:
func executeCommand(c, cwd string) (string, error) {
cmd := exec.Command("bash", "-c", c)
if _, err := os.Stat(cwd); !os.IsNotExist(err) {
cmd.Dir = cwd
}
out, err := cmd.Output()
return string(out), err
}
This would allow better execution overall I think. I will flag this fix for the next release!
Thanks!
from dropship.
Just an update I have made the change we spoke about above, but still need to write some tests for it. I am super busy right now with house hunting so I am not sure when It will get released I will more than likely just release this and a couple other thing in a 1.5.3
patch release.
Sorry for the slow turn around!
cc: @ericgreene, @dewey4iv, @Sdedelbrock, @kawikao
from dropship.
Related Issues (20)
- Configs for Consul
- Persist Hash Value
- JSON Service config HOT 1
- onFailure, onSuccess hooks HOT 1
- Race condition onClose
- Implement locker support for redis HOT 1
- Implement locker support for etcd HOT 1
- Implement Plain file downloading
- Docker registry support
- Add validation command
- Timeout for distributed deploys HOT 1
- Issues with script Hook HOT 1
- Post-deployment testing + rollback HOT 1
- Need rolling deployment HOT 1
- Wrong mime detection HOT 2
- Hook for after all deployments
- Management and Monitoring Interface
- Release, Build, and Testing
- Github repo support
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 dropship.