Allow VMs with hostname other than default (#19)
The VM runner created by nix is called `./run-<hostname>-vm`. So far, the code hardcoded it as `./result/bin/run-nixos-vm`, but for the users that want to change VM hostname it may be problematic.
Bu işleme şunda yer alıyor:
9
appvm.go
9
appvm.go
@@ -133,8 +133,13 @@ func generateVM(path, name string, verbose bool) (realpath, reginfo, qcow2 strin
|
||||
return
|
||||
}
|
||||
|
||||
bytes, err := ioutil.ReadFile("result/bin/run-nixos-vm")
|
||||
if err != nil {
|
||||
matches, err := filepath.Glob("result/bin/run-*-vm")
|
||||
if err != nil || len(matches) != 1 {
|
||||
return
|
||||
}
|
||||
|
||||
bytes, err := ioutil.ReadFile(matches[0])
|
||||
if err != nil || len(matches) != 1 {
|
||||
return
|
||||
}
|
||||
|
||||
|
Yeni konuda referans
Bir kullanıcı engelle