Sample Header Ad - 728x90

Copy file in home directory during Homebrew formula install

2 votes
0 answers
939 views
Is it possible to create files outside of /usr/local/Cellar during a Homebrew formula installation? Here is my code:
def install           
    cmd = "whoami; cd /Users/hughcrt; pwd; mkdir test"
    value = #{cmd}
    print value
end
And when I do brew install --build-from-source my-formula I get:
mkdir: test: Operation not permitted
hughcrt
/Users/hughcrt
It don't understand why I can't create a file as the user in the script is hughcrt and I'm in the right directory
Asked by Hugh (373 rep)
Jan 8, 2021, 02:39 PM
Last activity: Jan 8, 2021, 02:54 PM