Skip to content

mktemp does not exist on some edge devices #11972

@ahaoboy

Description

@ahaoboy
fish, version 4.1.2

Linux TX-AX6000-FAFC 5.4.225 #1 SMP Mon Jul 29 16:53:28 CST 2024 aarch64 TUF-AX6000_Koolcenter_mod

I tried running fish on a router, but it was a minimalist system, so there was no mktemp command.

fish can be run with default configuration, but when using starship it will complain due to missing mktemp

I've implemented a command-line program similar to mktemp in Rust, and it works perfectly now. However, I'd like to know if there are other solutions, or if fish will add support for systems where mktemp doesn't exist.

fish: Unknown command: mktemp
embedded:functions/__fish_mktemp_relative.fish (line 11):
    mktemp $argv_opts -- $TMPDIR/$argv.XXXXXX
    ^~~~~^
in function '__fish_mktemp_relative' with arguments '.psub'
        called on line 1 of file embedded:functions/psub.fish
in command substitution
        called on line 34 of file embedded:functions/psub.fish
in function 'psub'
        called on line 1 of file -
in command substitution
        called on line 1 of file -
from sourcing file -
        called on line 33 of file ~/.config/fish/config.fish
from sourcing file ~/.config/fish/config.fish
        called during startup

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