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

pnpm install.sh should append newline at the end of the shell config file #7227

Closed
3 of 4 tasks
hirohe opened this issue Oct 20, 2023 · 0 comments · Fixed by #7232
Closed
3 of 4 tasks

pnpm install.sh should append newline at the end of the shell config file #7227

hirohe opened this issue Oct 20, 2023 · 0 comments · Fixed by #7232
Assignees

Comments

@hirohe
Copy link

hirohe commented Oct 20, 2023

Verify latest release

  • I verified that the issue exists in the latest pnpm release

pnpm version

No response

Which area(s) of pnpm are affected? (leave empty if unsure)

Operating System (Windows, MacOS, Linux)

Link to the code that reproduces this issue or a replay of the bug

https://github.com/pnpm/components/blob/main/os/env/path-extender-posix/path-extender-posix.ts#L194C23-L194C33

Reproduction steps

from install page guide, in the end of script, it will append PNPM_HOME related config in shell config file.

Describe the Bug

the problem is, according to POSIX standard (https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206). a newline should be at the end of file. otherwise, it will cause some problems like: later execute echo "export SOME_VAR=something" >> ~/.zshrc, it can not append in newline, result something like #pnpm endexport SOME_VAR=something

Expected Behavior

maybe functions in path-extender-posix.ts file should add newline \n at the end of config file.

related links

Which Node.js version are you using?

16.14.0

Which operating systems have you used?

  • macOS
  • Windows
  • Linux

If your OS is a Linux based, which one it is? (Include the version if relevant)

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants