Skip to content

Volta bin stubs are invalid after renaming the local user #1304

@mmun

Description

@mmun

If the user renames their account, then the symlinks in the ~/.volta/bin folder may no longer be valid. I didn't run into this issue myself, but a coworker got tripped up on it.

Specifically, you can end up in a situation like this:

❯ ls -la /Users/NEW_USER/.volta/bin/
total 29560
drwxr-xr-x  19 NEW_USER  staff      608  9 Aug 17:05 .
drwxr-xr-x   9 NEW_USER  staff      288 14 Mar 13:24 ..
lrwxr-xr-x   1 NEW_USER  staff       35 25 Jul 16:28 node -> /Users/OLD_USER/.volta/bin/volta-shim
lrwxr-xr-x   1 NEW_USER  staff       35 25 Jul 16:28 nodemon -> /Users/OLD_USER/.volta/bin/volta-shim
lrwxr-xr-x   1 NEW_USER  staff       35 25 Jul 16:28 npm -> /Users/OLD_USER/.volta/bin/volta-shim
...

where /Users/OLD_USER no longer exists.

Some ideas:

  • Use relative symlinks instead of absolute symlinks
  • Add a command to rebuild the shims

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions