Skip to content

rmSync is not a function #14

@dscho

Description

@dscho

I get this stack trace on Windows:

$ git peek https://github.com/git-for-windows/git/pull/3017
 Extracting repository to temp folder...
💻 Launched editor in 0.89s
 Finished downloading repository!
🗑  Deleted temp repo
TypeError: u3.default.rmSync is not a function
    at uE (C:\Users\me\AppData\Roaming\npm\node_modules\@jarred\git-peek\bin\git-peek:497:846)
    at s3.run (C:\Users\me\AppData\Roaming\npm\node_modules\@jarred\git-peek\bin\git-peek:528:2695)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
TypeError: u3.default.rmSync is not a function
    at uE (C:\Users\me\AppData\Roaming\npm\node_modules\@jarred\git-peek\bin\git-peek:497:846)
    at s3.run (C:\Users\me\AppData\Roaming\npm\node_modules\@jarred\git-peek\bin\git-peek:528:2695)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)

That's with

$ node -v
v12.16.2

Is it possible that

fs.rmSync(instance.destination, {
should use await fs.promises.rm() instead (of course, doExit() would then have become async and all the call sites, including this one would have to be adjusted).

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