Skip to content

codeintel: forward $USER

Administrator requested to merge pass-user into main

Created by: chrismwendt

Prior to this change, when auto-indexing LSIF data for a repo, I encountered this error:

Current requires cgo or $USER set in environment

This error refers to user.Current(). It errored out because my src command does not have cgo (cgo is disabled during cross-compilation, and I'm on an M1 Mac) and the $USER environment variable is not being passed through the code intel executor.

After this change, the $USER environment variable is passed through the code intel executor.

Alternatives considered:

  • Replace user.Current() with os.UserHomeDir() in src-cli (this works, but forwarding $USER is more general)
  • Compile src-cli on macOS for cgo (requires more CI infra)
  • Don't use an M1 Mac (it seems Apple silicon is only going to grow in popularity)

Merge request reports

Loading