From 95cdc4ae8ca6f5242d0dada05a0b3992e4a9555d Mon Sep 17 00:00:00 2001 From: themester Date: Sun, 1 Jul 2018 21:10:57 +0200 Subject: [PATCH] Fixed Save() error --- goinsta.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/goinsta.go b/goinsta.go index f70d790c..64fefe71 100644 --- a/goinsta.go +++ b/goinsta.go @@ -129,12 +129,12 @@ func (inst *Instagram) UnsetProxy() { } // Save exports config to ~/.goinsta -func (inst *Instagram) Save() { - home := os.Getenv("$HOME") +func (inst *Instagram) Save() error { + home := os.Getenv("HOME") if home == "" { - home = os.Getenv("$home") // for plan9 + home = os.Getenv("home") // for plan9 } - inst.Export(filepath.Join(home, ".goinsta")) + return inst.Export(filepath.Join(home, ".goinsta")) } // Export exports *Instagram object options