Skip to content

Commit

Permalink
fix minor spacing issue in setup of bash_profile
Browse files Browse the repository at this point in the history
  • Loading branch information
machellerogden committed Feb 10, 2017
1 parent 59794aa commit 4a4513b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ function setup() {
export BITCAR_ROOT_DIR='${answers.rootDir}'
source $HOME/.bitcar/cli.sh
source $HOME/.bitcar/completions.sh
# end bitcar
`
# end bitcar`
const configContent = {
sources: []
};
Expand All @@ -78,8 +77,8 @@ source $HOME/.bitcar/completions.sh
fs.copy(path.normalize(__dirname + '/dotfiles/strip_codes'), path.normalize(process.env.HOME + '/.bitcar/strip_codes'));
fs.copy(path.normalize(process.env.HOME + '/.bash_profile'), path.normalize(process.env.HOME + '/.bash_profile.bkup'));
const bashProfile = fs.read(path.normalize(process.env.HOME + '/.bash_profile'));
let cleanedProfile = bashProfile.replace(/\n# begin bitcar[\s\S]+# end bitcar\n/gm, '');
cleanedProfile = cleanedProfile + os.EOL + profileContent;
let cleanedProfile = bashProfile.replace(/\n# begin bitcar[\s\S]+# end bitcar/gm, '');
cleanedProfile = cleanedProfile + profileContent;
fs.write(path.normalize(process.env.HOME + '/.bash_profile'), cleanedProfile);

return fs.commit(function (err) {
Expand Down

0 comments on commit 4a4513b

Please sign in to comment.