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

Ensure that folder exists before moving ipfs binary. #8934

Merged
merged 1 commit into from
May 6, 2022

Conversation

ajnavarro
Copy link
Member

@ajnavarro ajnavarro commented May 4, 2022

On macOS Monterey there is no /usr/local/bin folder and we need to create it.

Closes #8347.

@BigLep BigLep removed the request for review from aschmahmann May 5, 2022 16:10
@@ -15,6 +15,7 @@ is_write_perm_missing=""
for raw in $binpaths; do
# Expand the $HOME variable.
binpath=$(eval echo "$raw")
mkdir -p $binpath
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
mkdir -p $binpath
mkdir -p "$binpath"

(need to quote in case there's a space in the path)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
mkdir -p $binpath
mkdir -p ${binpath}

Use ${} syntax in case there is a space and a quote in the path.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The expansion needs to be quoted to protect against spaces, even when using curly braces. In this case, the curly braces are equivalent and just a style preference. So it needs to be either "$binpath" or "${binpath}" (I don't really care which), but not $binpath nor ${binpath}.

@ajnavarro ajnavarro force-pushed the fix/install-on-mac-m1-monterey branch from 9b29d70 to 09d7c13 Compare May 6, 2022 07:52
On macOS Monterey there is no /usr/local/bin folder and we need to
create it.
@ajnavarro ajnavarro force-pushed the fix/install-on-mac-m1-monterey branch from 09d7c13 to 7e488c1 Compare May 6, 2022 13:29
Copy link
Contributor

@Jorropo Jorropo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ajnavarro ajnavarro merged commit ae15e18 into ipfs:master May 6, 2022
@ajnavarro ajnavarro deleted the fix/install-on-mac-m1-monterey branch May 6, 2022 15:13
guseggert pushed a commit that referenced this pull request Jun 8, 2022
guseggert pushed a commit that referenced this pull request Jun 8, 2022
guseggert pushed a commit that referenced this pull request Jun 8, 2022
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.

Can't Install on MacOS 12 (Monterey)
3 participants