Show local apps as available

This commit is contained in:
Mikhail Klementev 2019-12-30 13:52:41 +00:00
parent 6ebc562599
commit cc92ec3e23
No known key found for this signature in database
GPG Key ID: BE44DA8C062D87DC

View File

@ -102,12 +102,20 @@ func list(l *libvirt.Libvirt) {
}
fmt.Println("\nAvailable VM:")
files, err := ioutil.ReadDir(os.Getenv("GOPATH") + "/src/code.dumpstack.io/tools/appvm/nix")
files, err := ioutil.ReadDir(configDir + "/nix")
if err != nil {
log.Fatal(err)
}
for _, f := range files {
switch f.Name() {
case "base.nix":
continue
case "local.nix":
continue
}
fmt.Println("\t", f.Name()[0:len(f.Name())-4])
}
}