Skip to content

Commit

Permalink
Merge #139309
Browse files Browse the repository at this point in the history
139309: scripts: include newline before appending to bashrc r=ibreakthecloud a=ibreakthecloud

`pnpm` tool is installed in gceworker as a part of bootstraping the gceworker vm. This installation
also writes to `~/.bashrc` file inside the same vm without putting the trailing newline. This resulted
in new appends happening at the wrong line, which effectively rendered any new command append a code comment.
example:
before: `command1` is a new append

`# pnpm ends herecommand1`

after: `command1` is a new append
`#pnpm ends here`
`command1`

This commit adds newline at two different instances.
First after the installation of `pnpm` and before
appending `. ~/.bashrc_bootstrap`.

Part of DEVINF-1371

Co-authored-by: Harshvardhan Karn <[email protected]>
  • Loading branch information
craig[bot] and ibreakthecloud committed Jan 22, 2025
2 parents 93fb203 + 1476b9c commit 1f2a46d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build/bootstrap/bootstrap-debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,13 @@ sudo apt-get install -y --no-install-recommends \

# pnpm doesn't provide a Debian repository, and supports either `curl | sh` or `npm install -g` installations.
curl -fsSL https://get.pnpm.io/install.sh | env PNPM_VERSION=8.6.6 sh -
echo -e '\n' >> ~/.bashrc

sudo adduser "${USER}" docker

# Configure environment variables.
echo 'export PATH="${PATH}:$HOME/go/src/github.com/cockroachdb/cockroach/bin:/usr/local/go/bin"' >> ~/.bashrc_bootstrap
echo -e '\n' >> ~/.bashrc
echo '. ~/.bashrc_bootstrap' >> ~/.bashrc
. ~/.bashrc_bootstrap

Expand Down

0 comments on commit 1f2a46d

Please sign in to comment.