From cc92ec3e237952f87ee82a6c2b8286b49f189e44 Mon Sep 17 00:00:00 2001 From: Mikhail Klementev Date: Mon, 30 Dec 2019 13:52:41 +0000 Subject: [PATCH] Show local apps as available --- appvm.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/appvm.go b/appvm.go index 42d6479..3b9c54f 100644 --- a/appvm.go +++ b/appvm.go @@ -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]) } }