Skip to content

failed to detect scriptname on read only file system #49

Closed
@contrun

Description

The function os.scriptname uses rename to detect if a file exists. Rename will always fail on my nixos machine as the executable lies in a read only file system. Here is the log after adding print(name, ok, err, code) to the function os.path.exists. Actually file /nix/store/99p0nyqgayic2ipqx2x4lr4njl8f5nrz-python3-3.6.8/bin/realpath do exist.

 lua ~/.z.lua/z.lua --init zsh                                                                                              ~
/nix/store/99p0nyqgayic2ipqx2x4lr4njl8f5nrz-python3-3.6.8/bin/realpath  nil     Read-only file system   30
/home/e/bin/realpath    nil     No such file or directory       2
/run/wrappers/bin/realpath      nil     No such file or directory       2
/home/e/.bin/realpath   nil     No such file or directory       2
/home/e/.bin/realpath   nil     No such file or directory       2
/home/e/.local/bin/realpath     nil     No such file or directory       2
/home/e/.cabal/bin/realpath     nil     No such file or directory       2
/home/e/.cargo/bin/realpath     nil     No such file or directory       2
/home/e/Local/go/bin/realpath   nil     No such file or directory       2
/home/e/.node/node_modules/.bin/realpath        nil     No such file or directory       2
/usr/local/bin/realpath nil     No such file or directory       2
/usr/bin/realpath       nil     No such file or directory       2
/bin/realpath   nil     No such file or directory       2
/home/e/.nix-profile/bin/realpath       nil     Read-only file system   30
/nix/var/nix/profiles/default/bin/realpath      nil     No such file or directory       2
/run/current-system/sw/bin/realpath     nil     Read-only file system   30
/etc/profiles/per-user/e/bin/realpath   nil     No such file or directory       2
/nix/store/99p0nyqgayic2ipqx2x4lr4njl8f5nrz-python3-3.6.8/bin/perl      nil     Read-only file system   30
/home/e/bin/perl        nil     No such file or directory       2
/run/wrappers/bin/perl  nil     No such file or directory       2
/home/e/.bin/perl       nil     No such file or directory       2
/home/e/.bin/perl       nil     No such file or directory       2
/home/e/.local/bin/perl nil     No such file or directory       2
/home/e/.cabal/bin/perl nil     No such file or directory       2
/home/e/.cargo/bin/perl nil     No such file or directory       2
/home/e/Local/go/bin/perl       nil     No such file or directory       2
/home/e/.node/node_modules/.bin/perl    nil     No such file or directory       2
/usr/local/bin/perl     nil     No such file or directory       2
/usr/bin/perl   nil     No such file or directory       2
/bin/perl       nil     No such file or directory       2
/home/e/.nix-profile/bin/perl   nil     Read-only file system   30
/nix/var/nix/profiles/default/bin/perl  nil     No such file or directory       2
/run/current-system/sw/bin/perl nil     Read-only file system   30
/etc/profiles/per-user/e/bin/perl       nil     No such file or directory       2
/nix/store/99p0nyqgayic2ipqx2x4lr4njl8f5nrz-python3-3.6.8/bin/python    nil     Read-only file system   30
/home/e/bin/python      nil     No such file or directory       2
/run/wrappers/bin/python        nil     No such file or directory       2
/home/e/.bin/python     nil     No such file or directory       2
/home/e/.bin/python     nil     No such file or directory       2
/home/e/.local/bin/python       nil     No such file or directory       2
/home/e/.cabal/bin/python       nil     No such file or directory       2
/home/e/.cargo/bin/python       nil     No such file or directory       2
/home/e/Local/go/bin/python     nil     No such file or directory       2
/home/e/.node/node_modules/.bin/python  nil     No such file or directory       2
/usr/local/bin/python   nil     No such file or directory       2
/usr/bin/python nil     No such file or directory       2
/bin/python     nil     No such file or directory       2
/home/e/.nix-profile/bin/python nil     Read-only file system   30
/nix/var/nix/profiles/default/bin/python        nil     No such file or directory       2
/run/current-system/sw/bin/python       nil     Read-only file system   30
/etc/profiles/per-user/e/bin/python     nil     No such file or directory       2
/nix/store/99p0nyqgayic2ipqx2x4lr4njl8f5nrz-python3-3.6.8/bin/python2   nil     Read-only file system   30
/home/e/bin/python2     nil     No such file or directory       2
/run/wrappers/bin/python2       nil     No such file or directory       2
/home/e/.bin/python2    nil     No such file or directory       2
/home/e/.bin/python2    nil     No such file or directory       2
/home/e/.local/bin/python2      nil     No such file or directory       2
/home/e/.cabal/bin/python2      nil     No such file or directory       2
/home/e/.cargo/bin/python2      nil     No such file or directory       2
/home/e/Local/go/bin/python2    nil     No such file or directory       2
/home/e/.node/node_modules/.bin/python2 nil     No such file or directory       2
/usr/local/bin/python2  nil     No such file or directory       2
/usr/bin/python2        nil     No such file or directory       2
/bin/python2    nil     No such file or directory       2
/home/e/.nix-profile/bin/python2        nil     Read-only file system   30
/nix/var/nix/profiles/default/bin/python2       nil     No such file or directory       2
/run/current-system/sw/bin/python2      nil     Read-only file system   30
/etc/profiles/per-user/e/bin/python2    nil     No such file or directory       2
/nix/store/99p0nyqgayic2ipqx2x4lr4njl8f5nrz-python3-3.6.8/bin/python3   nil     Read-only file system   30
/home/e/bin/python3     nil     No such file or directory       2
/run/wrappers/bin/python3       nil     No such file or directory       2
/home/e/.bin/python3    nil     No such file or directory       2
/home/e/.bin/python3    nil     No such file or directory       2
/home/e/.local/bin/python3      nil     No such file or directory       2
/home/e/.cabal/bin/python3      nil     No such file or directory       2
/home/e/.cargo/bin/python3      nil     No such file or directory       2
/home/e/Local/go/bin/python3    nil     No such file or directory       2
/home/e/.node/node_modules/.bin/python3 nil     No such file or directory       2
/usr/local/bin/python3  nil     No such file or directory       2
/usr/bin/python3        nil     No such file or directory       2
/bin/python3    nil     No such file or directory       2
/home/e/.nix-profile/bin/python3        nil     Read-only file system   30
/nix/var/nix/profiles/default/bin/python3       nil     No such file or directory       2
/run/current-system/sw/bin/python3      nil     Read-only file system   30
/etc/profiles/per-user/e/bin/python3    nil     No such file or directory       2
lua: /home/e/.z.lua/z.lua:1415: attempt to concatenate a nil value
stack traceback:
        /home/e/.z.lua/z.lua:1415: in function 'z_shell_init'
        /home/e/.z.lua/z.lua:1150: in function 'main'
        /home/e/.z.lua/z.lua:1696: in main chunk
        [C]: in ?

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions