mirror of
https://github.com/linka-cloud/d2vm.git
synced 2025-06-23 22:02:25 +00:00
set user permissions on image if run with sudo or in docker run/vbox & run/hetzner: run qemu-img in docker if not available in path Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
@ -26,8 +26,6 @@ import (
|
||||
|
||||
var (
|
||||
Run = RunNoOut
|
||||
|
||||
CommandContext = exec.CommandContext
|
||||
)
|
||||
|
||||
func SetDebug(debug bool) {
|
||||
@ -39,6 +37,11 @@ func SetDebug(debug bool) {
|
||||
}
|
||||
}
|
||||
|
||||
func CommandContext(ctx context.Context, c string, args ...string) *exec.Cmd {
|
||||
logrus.Debugf("$ %s %s", c, strings.Join(args, " "))
|
||||
return exec.CommandContext(ctx, c, args...)
|
||||
}
|
||||
|
||||
func RunDebug(ctx context.Context, c string, args ...string) error {
|
||||
logrus.Debugf("$ %s %s", c, strings.Join(args, " "))
|
||||
cmd := exec.CommandContext(ctx, c, args...)
|
||||
|
Reference in New Issue
Block a user