mirror of
https://github.com/linka-cloud/d2vm.git
synced 2025-08-20 14:06:42 +00:00
run/hetzner: rollback sparsecat using outside linux
Makefile: compute tag: ignore dirty state Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
@@ -243,7 +243,12 @@ func runHetzner(ctx context.Context, imgPath string, stdin io.Reader, stderr io.
|
||||
}
|
||||
}
|
||||
}()
|
||||
cmd := fmt.Sprintf("%s -r -disable-sparse-target -of %s", sparsecatPath, vmBlockPath)
|
||||
var cmd string
|
||||
if runtime.GOOS == "linux" {
|
||||
cmd = fmt.Sprintf("%s -r -disable-sparse-target -of %s", sparsecatPath, vmBlockPath)
|
||||
} else {
|
||||
cmd = fmt.Sprintf("dd of=%s", vmBlockPath)
|
||||
}
|
||||
logrus.Debugf("$ %s", cmd)
|
||||
if b, err := wses.CombinedOutput(cmd); err != nil {
|
||||
return fmt.Errorf("%v: %s", err, string(b))
|
||||
|
Reference in New Issue
Block a user