Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8333763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T03:08:13+00:00 2026-06-09T03:08:13+00:00

I am developing on OSX 10.7.4. I have been experiencing some problems getting the

  • 0

I am developing on OSX 10.7.4.

I have been experiencing some problems getting the “go get” command to work. In the course of trying to figure out what the problem was, I realized that Go was having trouble reading the $PATH environment variable.

The following script exhibits the problem:-

(PATH is returned as an empty string, and syscall.Getenv returns ok=false)

package main


import (
    "os"
    "syscall"
    "fmt"
)

func main() {

    path := os.Getenv("PATH")
    fmt.Println(path)

    syscall_path, ok := syscall.Getenv("PATH")
    fmt.Println(syscall_path)
    fmt.Println(ok)

}

I cannot imagine that this is a bug, as it is too dramatic to have gone unnoticed. So my question is this: In what way am I being stupid now?

🙂

I.e. What do I need to do to enable Go to access environment variables?

–Update:

As it turns out, it is actually a problem with my shell – Homebrew stopped working also, with the error message:

/usr/local/Library/Homebrew/global.rb:95: private method `split' called for nil:NilClass (NoMethodError)
    from /usr/local/bin/brew:10:in `require'
    from /usr/local/bin/brew:10

I think that the problem stemmed from my use of the fish shell, which does not seem to be setting up the environment as I might have expected.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T03:08:14+00:00Added an answer on June 9, 2026 at 3:08 am

    As it turns out, it was a malformed ~/.config/fish/config.fish file that was to blame.

    I was using:

    set -g VARNAME value
    

    Which instead should be:

    set VARNAME value
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Developing a project of mine I realize I have a need for some level
I have been developing a project in python for the last six months, and
I have been developing a Java application using J2EE and a Derby database. My
I have run into problems getting my local php and rails development environments to
I'm trying to learn some of the basics of developing OS X apps with
Unfortunately I'm developing under a osx machine where I've been unable to install imageTK...
I have a Java project that I've been developing primarily in windows. I have
I have been trying to find online release notes for xcode 4.2.1 but have
I've been trying to set up ninjauth but see to have run into a
I am developing an application to work on Mac OSX 10.5 and later and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.