Skip to content

current version of nushell can't be installed in rpm-ostree #77

Description

@Taywee

In rpm-ostree, the install step isn't given a usable home directory, which causes problems with nushell's post install:

Aug 16 09:47:56 hostname rpm-ostree(nushell.post)[7063]: Error: nu::shell::error
Aug 16 09:47:56 hostname rpm-ostree(nushell.post)[7063]:   x Config path resolution failed
Aug 16 09:47:56 hostname rpm-ostree(nushell.post)[7063]:    ,----
Aug 16 09:47:56 hostname rpm-ostree(nushell.post)[7063]:  1 | src/main.rs:214:38
Aug 16 09:47:56 hostname rpm-ostree(nushell.post)[7063]:    : ^^^^^^^^^|^^^^^^^^
Aug 16 09:47:56 hostname rpm-ostree(nushell.post)[7063]:    :          `-- Could not determine the home directory
Aug 16 09:47:56 hostname rpm-ostree(nushell.post)[7063]:    `----
Aug 16 09:47:56 hostname rpm-ostree(nushell.post)[7063]: Nushell plugins were installed to /usr/libexec/nushell
Aug 16 09:47:56 hostname rpm-ostree(nushell.post)[7063]: Registering plugins...
Aug 16 09:47:56 hostname rpm-ostree(nushell.post)[7063]: Error: nu::shell::error
Aug 16 09:47:56 hostname rpm-ostree(nushell.post)[7063]:   x Plugin registry file not set
Aug 16 09:47:56 hostname rpm-ostree(nushell.post)[7063]:     ,-[/usr/libexec/nushell/post-install.nu:28:5]
Aug 16 09:47:56 hostname rpm-ostree(nushell.post)[7063]:  27 |   for p in $NU_PLUGINS {
Aug 16 09:47:56 hostname rpm-ostree(nushell.post)[7063]:  28 |     plugin add $'($PLUGIN_PATH)/($p)'
Aug 16 09:47:56 hostname rpm-ostree(nushell.post)[7063]:     :     ^^^^^|^^^^
Aug 16 09:47:56 hostname rpm-ostree(nushell.post)[7063]:     :          `-- pass --plugin-config explicitly here
Aug 16 09:47:56 hostname rpm-ostree(nushell.post)[7063]:  29 |   }
Aug 16 09:47:56 hostname rpm-ostree(nushell.post)[7063]:     `----
Aug 16 09:47:56 hostname rpm-ostree(nushell.post)[7063]:   help: you may be running `nu` with --no-config-file

This might be fixable by setting XDG_CONFIG_HOME to a real location ahead of time. I think the same problem would possibly kick in on a non-ostree setup if the root user had no usable home.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions