Skip to content
Snippets Groups Projects

codeintel: forward $USER

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

Approval is optional

Merged by avatar (Aug 27, 2025 8:47am UTC)

Merge details

  • Changes merged into main with 0c3618eb.
  • Deleted the source branch.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading