Show local apps as available

This commit is contained in:
dump_stack() 2019-12-30 13:52:41 +00:00
parent 6ebc562599
commit cc92ec3e23
Signed by: dump_stack
GPG Key ID: BE44DA8C062D87DC

View File

@ -102,12 +102,20 @@ func list(l *libvirt.Libvirt) {
} }
fmt.Println("\nAvailable VM:") 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 { if err != nil {
log.Fatal(err) log.Fatal(err)
} }
for _, f := range files { 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]) fmt.Println("\t", f.Name()[0:len(f.Name())-4])
} }
} }