Skip to content
This repository has been archived by the owner on Aug 25, 2023. It is now read-only.

Commit

Permalink
Fixed Save() error
Browse files Browse the repository at this point in the history
  • Loading branch information
dgrr committed Jul 1, 2018
1 parent d75fb37 commit 95cdc4a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions goinsta.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 95cdc4a

Please sign in to comment.