Skip to content

Commit

Permalink
bugfix: Fix Issue with Path Quoting Update hubble.sh (#2426)
Browse files Browse the repository at this point in the history
## Why is this change needed?

**Subject:** Fix Issue with Path Quoting in `source ~/.bashrc`

A bug in the script where the `~` symbol, which represents the user's
home directory, was not expanding properly.

Specifically, in the following code:

```bash
if [[ ! -f "~/.bashrc" ]]; then
  source ~/.bashrc
fi
```

The `~` should have been outside the quotes to properly expand it to the
full path. The corrected version is:

```bash
if [[ ! -f ~/.bashrc ]]; then
  source ~/.bashrc
fi
```

## Merge Checklist

_Choose all relevant options below by adding an `x` now or at any time
before submitting for review_

- [x] PR title adheres to the [conventional
commits](https://www.conventionalcommits.org/en/v1.0.0/) standard
- [x] PR has a
[changeset](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#35-adding-changesets)
- [x] PR has been tagged with a change label(s) (i.e. documentation,
feature, bugfix, or chore)
- [x] PR includes
[documentation](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#32-writing-docs)
if necessary.


<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on a minor adjustment in the `scripts/hubble.sh` file to
correct the file path check for `~/.bashrc`.

### Detailed summary
- Changed the conditional check from `if [[ ! -f "~/.bashrc" ]]; then`
to `if [[ ! -f ~/.bashrc ]]; then` to ensure proper evaluation of the
file existence.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`

<!-- end pr-codex -->
  • Loading branch information
Dmitry authored Dec 10, 2024
1 parent ccfb458 commit 29436aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/hubble.sh
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ fi

if [ "$1" == "autoupgrade" ]; then
# Autoupgrade cronjob needs the correct $PATH entries
if [[ ! -f "~/.bashrc" ]]; then
if [[ ! -f ~/.bashrc ]]; then
source ~/.bashrc
fi

Expand Down

0 comments on commit 29436aa

Please sign in to comment.