Problem editing .bash_profile while installing Flutter on mac

Viewed 136

I am installing Flutter on my mac and I need to add a path in my .bash_profile file. But it already has contents in it and I do not want to mess up what i have. So how do i do this?

This is what is in my .bash_profile currently:

export JAVA_HOME=$(/usr/libexec/java_home)
# Setting PATH for Python 3.7
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.7/bin:${PATH}"
export PATH

I need to add:

export PATH="/Users/rishika/flutter/bin:$PATH"

in order to install Flutter

Please let me know how to go about this. Thanks.

1 Answers

The same way PATH was modified in the next-to-last line of your file.

PATH="/Users/rishika/flutter/bin:$PATH"

The export PATH is likely unnecessary (though harmless); PATH is either inherited from the parent process or exported from a system file like /etc/profile, so already marked for export.

Related