Skip to content

Export KUBECONFIG to current terminal's session #13

Description

@ibreakthecloud

Describe the bug

  • cmd/cluster_use.go is trying to set env var, using os.Setenv() which is only accessible inside program, i.e. child process.
    Possible Explanation: A process has a copy of its parent's environment and can't write to the parent environment.
    Process Tree:
`--- shell
          `--- go program
          |
          `--- other program

Expected behavior
It is suppose the set the env variable KUBECONFIG in terminal.
os/exec can be used in this scenario, but the major drawback can be export is not a binary.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions