Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bug in c(username) when it contains a dash "-"?

    On Stata15/MP for unix:

    Code:
    . !echo "`whoami`"
    
    caceres-d
    
    . disp "`c(username)'"
    caceres-
    Does anyone else have this issue? If I inspect the value in "creturn" it also just lists my username up to the dash.

  • #2
    This appears to be a bug in the C library function we are using to retrieve the username. We will work around this by using another set of library functions (which don't exhibit this behavior) to retrieve the username and will release the workaround in a future update.

    As a temporary workaround, you could get your username from an environment variable like this:

    Code:
    . local myuname : env LOGNAME
    
    . display "`myuname'"
    caceres-d

    Comment


    • #3
      Seems to work. Cheers!

      Comment

      Working...
      X