Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing awaits for enquirer.prompt #6

Merged
merged 1 commit into from
Mar 5, 2021
Merged

Fix missing awaits for enquirer.prompt #6

merged 1 commit into from
Mar 5, 2021

Conversation

esdmr
Copy link

@esdmr esdmr commented Mar 4, 2021

Running pnpm install-completions causes the following output.

✔ Which Shell do you use ? · fish
Very well, we will install using undefined
? Which path then ? Must be absolute. ‣ ? We will install completion to ~/.config/fish/config.fish, is it ok ? (y/$HOME/.local/share/npm/lib/node_modules/pnpm/dist/pnpm.js:8450
      throw new Error("options.location is required");
            ^

Error: options.location is required
    at Object.install ($HOME/.local/share/npm/lib/node_modules/pnpm/dist/pnpm.js:8450:13)
    at install ($HOME/.local/share/npm/lib/node_modules/pnpm/dist/pnpm.js:8557:21)
    at processTicksAndRejections (node:internal/process/task_queues:94:5)
    at async $HOME/.local/share/npm/lib/node_modules/pnpm/dist/pnpm.js:123194:7

Only one of the prompts in the file lib/prompt.js is actually awaited. This PR fixes the rest.

Running `pnpm install-completions` causes the following output.

```
✔ Which Shell do you use ? · fish
Very well, we will install using undefined
? Which path then ? Must be absolute. ‣ ? We will install completion to ~/.config/fish/config.fish, is it ok ? (y/$HOME/.local/share/npm/lib/node_modules/pnpm/dist/pnpm.js:8450
      throw new Error("options.location is required");
            ^

Error: options.location is required
    at Object.install ($HOME/.local/share/npm/lib/node_modules/pnpm/dist/pnpm.js:8450:13)
    at install ($HOME/.local/share/npm/lib/node_modules/pnpm/dist/pnpm.js:8557:21)
    at processTicksAndRejections (node:internal/process/task_queues:94:5)
    at async $HOME/.local/share/npm/lib/node_modules/pnpm/dist/pnpm.js:123194:7
```

Only one of the prompts in the file `lib/prompt.js` is actually awaited. This PR fixes the rest.
@zkochan zkochan merged commit 1d5f5c2 into pnpm:main Mar 5, 2021
@esdmr esdmr deleted the patch-1 branch March 5, 2021 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants