Skip to content

Commands inside traps are not resolved #123

@Jayman2000

Description

@Jayman2000

Consider this line of Bash code:

trap hello EXIT

The hello in that line of code is an external command that should be resolved, but unfortunately, resholve does not resolve it at the moment.

Steps to reproduce

  1. Make sure that the hello command is not on your PATH.

  2. Run the minimum reproduction script that I created by running this command:

    nix --extra-experimental-features 'nix-command flakes' run 'git+https://codeberg.org/JasonYundt/commands-inside-traps-are-not-resholved.git?ref=refs/heads/main&rev=48e736a6b3225210da87d4b21033883b6e4c459d'

Result

/nix/store/mam02cpq1v1y6hi242djd1fi5dk37gqi-test-trap-parsing/bin/test-trap-parsing: line 1: hello: command not found

Metadata

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