Skip to content

[BUG] Demo - the cleanup trap expands $DEMO_TEMP_DIR unquoted #58

@GingerGraham

Description

@GingerGraham

In this demo, the cleanup trap expands $DEMO_TEMP_DIR unquoted (trap 'rm -rf $DEMO_TEMP_DIR' EXIT). ShellCheck will flag this and it can misbehave if the path ever contains spaces/globs. Quote the variable inside the trap command.

trap 'rm -rf -- "$DEMO_TEMP_DIR"' EXIT

Originally posted by @Copilot in #56 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions