mirror of
https://github.com/pnpm/pnpm.git
synced 2026-04-05 07:46:10 -04:00
fix(setup): suggest to source the config (#5165)
This commit is contained in:
6
.changeset/lemon-carpets-jump.md
Normal file
6
.changeset/lemon-carpets-jump.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@pnpm/plugin-commands-setup": patch
|
||||
"pnpm": patch
|
||||
---
|
||||
|
||||
On POSIX `pnpm setup` should suggest users to source the config instead of restarting the terminal.
|
||||
@@ -102,7 +102,13 @@ function renderSetupOutput (report: PathExtenderReport) {
|
||||
}
|
||||
output.push(`Next configuration changes were made:
|
||||
${report.newSettings}`)
|
||||
output.push('Setup complete. Open a new terminal to start using pnpm.')
|
||||
if (report.configFile == null) {
|
||||
output.push('Setup complete. Open a new terminal to start using pnpm.')
|
||||
} else if (report.configFile.changeType !== 'skipped') {
|
||||
output.push(`To start using pnpm, run:
|
||||
source ${report.configFile.path}
|
||||
`)
|
||||
}
|
||||
return output.join('\n\n')
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,9 @@ test('setup makes changes on POSIX', async () => {
|
||||
Next configuration changes were made:
|
||||
export PNPM_HOME=dir2
|
||||
|
||||
Setup complete. Open a new terminal to start using pnpm.`)
|
||||
To start using pnpm, run:
|
||||
source ~/.bashrc
|
||||
`)
|
||||
})
|
||||
|
||||
test('setup makes changes on Windows', async () => {
|
||||
|
||||
Reference in New Issue
Block a user