Skip to content

npm pack does not work with pre/post scripts #83

@moltar

Description

@moltar

The code relies on execSync returning the filename that was packed. But if there are any pre/post scripts, then this output will also be sucked into the final string.

execSync("npm pack", { cwd: fileOrDirectory, encoding: "utf8", stdio: "pipe" }).trim()

The fix could be using the --pack-destination flag to set a predictable path for the packed tarball, rather than relying on output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions