Skip to content

collisions on central progress file with standard tmpdir #26

@code-acrobat

Description

@code-acrobat

It's not possible to safely deploy with standard TMPDIR settings with multiple users as the progress file is shared.
With single users the output can be misleading, with multiple involved users you potentially get an error.
[exec] Error: EACCES: permission denied, open '/tmp/rollup-plugin-progress'

export TMPDIR=`mktemp -d`
$ nodejs
> const { default: os } = await import("os");
> path.resolve(os.tmpdir(), "./rollup-plugin-progress");
'/tmp/tmp.LZKCTrQUm2/rollup-plugin-progress'

Forcing users to change the shell defaults is very user unfriendly.

A better way would be to use the tmp module.
https://github.com/raszi/node-tmp?tab=readme-ov-file#synchronous-file-creation-1

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